Files
archy/core/target/debug/deps/libsharded_slab-ccabff3b89ad80aa.rmeta
T

927 lines
375 KiB
Plaintext
Raw Normal View History

2026-01-24 22:59:20 +00:00
rust
æØ#rustc 1.93.0 (254b59607 2026-01-19)Áõ…·fÊ ¦%g--c48c539199cbc88bÁ³VOÐêùÿ²?ÑL¼§Ì±-a7a40eb546f9e2b0Áá\ƒ¦è3$|]åŒ[IÚ tæ-14b12edc9f8cd90bÁë&Gf·Ã ¬ëñq:¤»b-bb76018b1173caf6Áà 9m Ù„«ÐÒþá•cB;-030c5b0bba47cc8fÁrustc_std_workspace_coreÁÛ¹þÓ7>H%¸ÚÉ­-4b81d37a5530864dÁüÃùs<Uß7VyóHr#QÏ-c66cc7807550ce25Á miniz_oxideÁõFÖˆÚ™ª‹"ÞXzLVª-62cbc7af83058505Áadler2Á—wÉD‘嵯|6¨%Œ
+-2f171dd2394b4b62Á hashbrownÁ,ïcV¼¨ø¢:Ê\'È߈-9571ba9e0f6c7a90Árustc_std_workspace_allocÁ%¥Èxµù·¼5Ä3Bœ-aac566ad65903fa4Á
std_detectÁMmáýZ^9õ Îà§e˜÷e-2edb296e590136d8Árustc_demangleÁ@¼§VÉNb˜æ¨fHÌ+V3-53b132e4a2fa6e26Ácfg_ifÁfÝv.Å"ÒÜuPp¹ˆ¶-f76b385d7d4d7f3eÁ addr2lineÁÕú-WiúQVÓ¬
µT§5-fe25100bd73e48e4ÁgimliÁ¹xLáÇí÷‘o±Ñ8£Å-265ba9e6e4f70b3fÁobjectÁÔ³ÝzÓÿ¶ò°öM›¼òü`-9ae0d1f8ea52a318ÁmemchrÁRÎ÷׎™te~QÓ¿ØC\Ò-0bff3c8e8f4e489eÁ  –©HtGNÏ·ˆ!á-d69228d077d46f36Á lazy_staticÁ8ĪkK»³çÙ"dÁóN-2eddbd7c6d499488Átest_dbgÁDÜàÔtestsÁ,ò+à$ç+innerÁ,SloomÁ$*à¾Ðà$á[à$Ö[withÁ$…$à$ä# test_utilÁL¹ààmacrosÁ test_printlnÁ
panic_in_dropÁdebug_assert_eq_in_dropÁimplementationÁpoolÁ 
  
PoolÁkshardsÁ_cfgÁRefÁ'aÁk²shardÁkeyÁRefMutÁ$Ã $$k$²$à $ì OwnedRefÁ++k+²+Â
+ì  OwnedRefMutÁ11k1²1Â
1ì 77 7new_with_configÁ:k<<k< USED_BITSÁ<createÁ@ < create_ownedÁB < create_withÁDimpl FnOnce(&mut T)Á<getÁF < get_ownedÁH <clearÁJ J MMkPPkSS>VVkVÍZà ZZkZì Z˜`à ``k`š`fà ffkf² kà kkkkÍ
pà ppkpÕ uà uukuì u downgradeÁu˜ |à ||k|š|
à kà k²Œà ŒŒkŒÍà kÕkì ˜kš  k ²¤¤k¤Í¨¨k¨Õ¬¬k¯¯k²²k²ì ²ý²à ²˜¹¹k¹š¹¾¾k¾ÂÂkÂ²ÆÆkÆÍÊÊkÊÕÎÎkÑÑk¢ÔÔÔÔÔÔÔÔÔÔConfigÁÞ MAX_THREADSÁÞ MAX_PAGESÁÞINITIAL_PAGE_SIZEÁÞ
RESERVED_BITSÁÔ
CfgPrivateÁãÐ
ã
INITIAL_SZÁã
MAX_SHARDSÁãADDR_INDEX_SHIFTÁã page_sizeÁãããvalidateÁãunpackÁëã unpack_addrÁã
unpack_tidÁã
unpack_genÁÔðkÔ DebugConfigÁòkò® ÔWIDTHÁÔ next_pow2ÁÔ÷Ò÷®÷ÁÔûÍÔýkýͲ²Š spin_loopÁŒŒ ŒûŒwith_mutÁÄÍá get_refÁget_mutÁ
into_innerÁÖœœœœœœClearÁ¢Öœ¤¤Öœ§§ÖœªªÖœ­­­­Öœ²²Î²ÖœÖœ¸¸Öœ»»Ö£ ¾¾¾¾¾¾¾¾Æà ÆÆkƽƥ Ë ¾ÍÍkpageÁÐÐÐÐÐÐÐslotÁ×××××××××× ×
× × ×
×××××SlotÁêêkê lifecycleÁê¥ ê¡ ê® ×
GenerationÁñkñ˜ñ® ×RefCountÁõkõ˜õ® × LifecycleÁùkùù® × LifecycleGenÁý
ýkýì×kLENÁPrevÁûas_usizeÁ×k ׊ŠkŠ¥  Š˜ Šset_nextÁ Š´Š mark_releaseÁŠ release_withÁÄÍ ŠinitÁ×kis_emptyÁž insertÁtry_remove_valueÁ¡Ä remove_valueÁ£Ä£ צ¦k¦ ¦try_clear_storageÁªÄ¦
clear_storageÁ¬Ä¬ ® ×°°k°releaseÁ×´´k´Í׸k¸Í×»k»advanceÁ× ¾k¾Õ×
Ák× Ãkä × ÆkÆÐ×
ÉkÉÈ×Ìk×ÎÎkÎñ$ÎËÎ˜Ó ×ÕkÕMARKEDÁÕREMOVINGÁÕPRESENTÁ×ÚkÚ¡!Ú¬!ÚûÚÀ!×àkàÕ×ãk×åkåÍ×èkè¡!è¬!èûèÀ!×îkîMAXÁîincrÁîdecrÁ×ókóÍ×ököÕ×ùk×ûkû¤ ×þkþÐ×kÈ×k×k¡!¬!ûÀ!׌ŒkŒ
generationÁŒ˜ Œ value_mutÁ Œñ$ŒýŒrelease2Á×exponential_backoffÁ MAX_EXPONENTÁÐstackÁ
TransferStackÁ¡k¡headÁ¡® ¥k¥ ¥pop_allÁ¥pushÁ©impl Fn(usize)Á«k«›,­­ °k°ÍÐÐÐÐ ÐAddrÁ·k·addrÁ·® лk»NULLÁ»ö»Ð ÐFreeListÁÀkÀ›,ÂÐÄkÄ¡!Ĭ!ÄÀ!ÄûÐIterÁÊà ÊÊkÐLocalÁÎä+ÐSharedÁÐÐkÐremoteÁÐèÐprev_szÁÐslabÁÐSlotsÁ××kÐÚ Úä+Ü Úset_headÁÞ Ðàkà›,âÐääkä¹-ä äpopÁäis_unallocatedÁê ä with_slotÁìà ìì(impl FnOnce(&'a Slot<T, C>) -> Option<U>Áì ä free_listÁñÐóà óókótakeÁ÷Ä÷ óremoveÁúÄú ü ómake_refÁó£ ÿ ÿ Ðk init_withÁø0,impl FnOnce(usize, &Slot<T, C>) -> Option<U>Á allocateÁ 
mark_clearÁÄ  ÖÄ  ÐÍ ÐkÍÐ škšÍÐ
kÕÐ  kÐ ¢k¢¤ Ð
¥k¥ÐШk¨ÈЫkÐindicesÁ­kà ¯¯¯¯¯¯¯¯¯¯ ¯
¯ ¯ ¯
¯¯¯¯¯¯¯ShardÁÄÄkÄtidÁÄÛ ÄsharedÁ¯ArrayÁÊÊkÊ¡ ÊmaxÁ¯ÏÏkÏß0ÒÃ Òø0Ò.impl FnOnce(&'a page::Slot<T, C>) -> Option<U>ÁÏ Ö Ö ¯ÙÙkÙ
take_localÁÙ take_remoteÁÙ remove_localÁÙ
remove_remoteÁÙ£ ¯ááká×2äø0ä1impl FnMut(usize, &page::Slot<T, C>) -> Option<U>Áámark_clear_localÁámark_clear_remoteÁáclear_after_releaseÁá clear_localÁá clear_remoteÁáÛ ¯ííkíͯññkñ ñ´ñcurrentÁö ñ§ ¯ùùkù²¯ýýkýͯkÉ Ù setÁ¯Ã k½¥ Ã6 
  
TidÁ¢k¢idÁ¢ _not_sendÁ¢® RegistryÁ§¥ §freeÁªkª¡!ª¬!ªÀ!ªû°k°‰;² °
is_currentÁ´ ° ·k·poisonedÁ· is_poisonedÁ»k»Í¾k¾ÕÁkÃkÃÈÆkÈ È‰;ÊkÈregisterÁÌkÌ Ì  Ð²Ñ 
  
SlabÁââkâ¡ â® EntryÁçà ççkç²ç˜çà çì 
OwnedEntryÁïïkï²ï˜ï¢/ïì öö ö£
ùkûûkûÐ
ûª#ÿ ÿ û vacant_entryÁ û2  ûè1û´ˆ ûŠ ûcontainsÁû unique_iterÁŽŽ>kÍk˜˜kà kì ˜¡Ã ¡¡k¡š¡§Ã §§k§² ¬Ã ¬¬k¬Í
±Ã ±±k±Õ à kª#ì  ¼¼k¼ì ¼˜
ÁÁkÁšÁÆÆkƲÊÊkÊÍÎÎkÎÕÒÒkÕÕkPackÁØkØ¡!ج!ØBITSÁØSHIFTÁØMASKÁØÀ!ØûØpackÁØ from_packedÁãkãøGã¡!ã„Hã‘Hã¬!ãÀ!ãûã­Hã¹HÔ
DefaultConfigÁî_pÁÔÔÔòÈ
UnsafeCellÁô
ôôìøøÍTrackÁûû˜þþÍ>¾
UniqueIterÁà k¡ pagesÁslotsÁ¾Ã kÍ×GuardÁkË× kÍ× InitGuardÁ˜˜k˜Ë˜curr_lifecycleÁ˜releasedÁ×!žžkžÍ×StateÁ¢PresentÁ£
£ ¢MarkedÁ¦
¦ ¢RemovingÁ©
© ×"¬Í×#®˜×$×%±Õ×&×'×(µÈ¯PtrÁ·
··k·ì¯ ¼¼k¼Í¯IterMutÁÀ
Àà ÀÀkÀì¯
ÆÃ ÆÆkÆÍ RegistrationÁË
Ëì
ÎÍREGISTRYÁÐ__private_fieldÁÓO ÓšÓÕ__static_ref_initializeÁÕ __stabilityÁ Ø
initializeÁ×LAZYÁ REGISTRATIONÁÛ__rust_std_internal_init_fnÁÛ Ý Þ__RUST_STD_INTERNAL_VALÁÝ à­Q VacantEntryÁâà ââkâ²âì â_ltÁéà éékéÍ@
D
D
F
J
Y
Y
Y
^
_
e
j
o
o
o
t
t
y
{









š
Ÿ
£
§
§
§
«
«
µ
·
¸
½
Á
Å
É
É
É
Í
Í
ü
ü
ü
ÿ
ÿ
ÿ



š
£
¦
©
¬
±
µ
·
º
½
Ë
Í









š
ž
 
 
¡
¡
£
£
ª
ª
¬
¬
³
·
·
·
º
º
º
À
À
Å
Å
È
È
Ë
Ñ
Ò
Ó
ß
â
â
ç
ç
ç
í
õ
õ
õ
ø
ø
ý
ý


ƒ








¨
©
­
­
²
²
²
Â
Â
È
Ü
Þ
â
â
é
é
ê
ñ
÷
÷
ú
ú
ÿ














œ
œ
œ
Ÿ
Ÿ
¤
¤
§
§
ª
Ü
Ý
Þ
ß
à
ä
ä
ç
è
é
ê
ë
ì
ð
ð
ð
õ
ö
ø
ü





Œ
®
º
½
½
½
À
À
Å
Ê
Ì
Ñ
ÿ



ˆ
Œ




Ÿ
 
¦
«
°
°
°
µ
µ
»
¿
À
Å
É
Í
Í
Í
Ñ
Ñ
ß
á
ê
ì
ó
ú
ú
ú









¡
¡
¡
­
­
­
¯
²
²

¿
¿
¿
Ê
Ê
Ê
Ï
Ï
Ï
Õ
Ù
í
í
í
Þã¢Àب⠡ ® ¦JùSzÞ ÂkÉ^Ä ¡ ® ¦JùSzÞ Âü^îîŸIï´IÔ4óÞ ÓçϪà`É^ì¹ !²"à #ì ©Ìw—‹z†8à k Œ`à`Œ`žŒ`Ï`ì$$ö (²)à *ì Àžmì¾ÒSà Ï`Õ`ù‚a ‚aà`‚až‚aÏ`ì++¬ .²/Â
0ì dgØ®¨Ñü^‚_ ýaà`ýažýaü^ýa¨âýaì11Ý 4²5Â
6ì Ù”}ü^‚_ùýb ýbà`ýbžýbü^ýb¨âýbãkþÎ_áÎ_ÞÎ_ÞÎ_à`Î_à`òòÙô® ÔÊ„¦™_1ýM‡dà`ôôõÕI÷ì L| æü^à`ûû‘Jý˜ÍØ6†âãü^Ä·e¢ø°ú°û°Ðü°ý°þ°ìHˈXêE>ü^¢BoxÁ샚íƒlÕ°Ù[¢'õü^•E•EEGlobalÁ Ï€ûkW¬ s¢ßAßA­âAbufÁ«<ãA¾ «<µ[<™éü^‰g¢ÆÆ§ÊbaseÁµ®`§L]ýB¼Å΢´ ´ ©· —g¢ >D“Úüx«
ü^΢ÉHÉHÊHœÜ3ËÚ¢×€JÜ¢¾:¾:ËÀ:²¬:Á:poisonÁ¬:Â:dataÁ¬:«¡Ïmlèé¿ü^¢¹;¹;»;²¦;¼;Þh¦;½;ðh¦;MÔÕÅxƒeyü^à`×Jˆ¡ ˆKŠ•K±pþœnà Ï`Õ`ÞKçjÖN×Jˆ¡ ˆKŠ•K±pþœn8Ï`Õ`à`ÆKË×ôÔò¹8ªü^‚_à`˜˜†LËל®L×ÄL×Ê“æn¿P*iü^‚_à`¢£¤ýL¥¦§–M¨©ª®M«"ÒhÚ'/_£¦m¬â¦mž¦m¦mþ¦má¦mÞ¦mØññõó˜×ô® ×é„©sM!݇d‡dà`êê±íÌ×î¥ ×ï¡ ×ð® ×tvÔý³Nü^‚_à`ºnžºnºn£ºnɺnºnúnÞºnþºnØùùÅ û×ü® ×ø]î¡Ðhä‡d‡džªpªp£ªpà`ªpØõõž ÷˜×ø® ×CLÎ3£(‹‡d‡dà`‘qž‘q‘q£‘qÉ‘q‘qÑqÞ‘qþ‘qØýýþí ì× p?ã°‡d‡dÀ¡¡È+£ä+¤® ì¬ÿϲᆥ‡d‡dà`árØ··†-¹™-к® Ðà¥÷G”Æ™‡d‡dÀÎÎË.Ïä+Ðí†×ßé-‡dà`÷sà`ÐÐà.Óý.ÐÔèÐÕ“/ÐÖ¢/ÐðR  Èš_‡dÏ`à`±sž±s±s£±sɱs±sñsÞ±sþ±sà`··¸‹N»ì¯ <ܚߊ¢ü^‚_à`ÀÀÁÎNÅì¯ W§1coÊà Ï`Õ`à`Äħ6ÇÃ6ÈÛ ¯ÉÖ6¯pɵ ¾ï´ü^‚_ ÊÊä6Í¡ ¯Îˆ7¯À
™š1‡òšü^‚_à`µwÞK và`ËËÌ¥OÍì 7n³*Û`¥.ìÐÐÓOÑãO֪ŵ|¨EcÇxØ¢¢£=¤µ=¥¿=¦® Š”lî±ÖÙ9‡d‡dà`„yž„y„y£„yÞ„yþ„y xà`ââØQæ²çì è’RƉ­uÍ…tà Ï`Õ`Äââí@å¡ æ® ¶Œ ¼Œå åü^Î_à`ââí@å¡ æ® ¶Œ ¼Œå åü^‚_¨â®{®{ìçç—Aë²ì˜íà îì ¡]y`G uà Ï`Õ` ‡|à`‡|ž‡|Ï`ìïïÚAò²ó˜ô¢/õì ¢H¶sC°–ü^‚_ ˆ}à`ˆ}žˆ}ü^ˆ}¨âˆ}؇dM¯1•âÕïP¬âÒïSûŽâVkŒîýòøôþûž˜¬¢´ê¸ñåùóõ°¡ÎК·¼·ÆÀíÄýÊÎË»¢éââ¬çÊï`|$›Ð¡çÁïfÊÐ˧çÆïp¢¾ñàùöõ·¾¢±çÎïðî³¢Ìñõ«·Æ¢ñî´¢òîµ¢Éñõ¨·Ã¢÷î¤ø°§ªßA­Æ²´ ÉH¸¾:»¹;ÆÀÍ®¢Áñãùùõ ·Á¢°¢ñÚùèõýÄ·ª¢ã
Ãñûõ¢·Æñþõ¥·«¡àÎØÐ¨âµÄà`ìÒ +ž 3ùOã þá*ÞÞ*¢ÞK9ÖN£¬â*ØÉ/ÃÀdÛk
ä‚_ü¾k*?,Ók$Cä_ C::USED_BITSÁÔù
ßÎ_üÞ6ß%DßÎ_DefaultConfig::MAX_THREADSÁÄ‹
àÎ_üò2à%DàÎ_DefaultConfig::MAX_PAGESÁüž  áÎ_üý
Bá,– %EáÎ_ DefaultConfig::INITIAL_PAGE_SIZEÁü›3¼›Úññõó˜×ô® ×é„©sM!Ý”Š̵ÝÛ‰”Šv xÚÛ‰”Š<ÝÛ‰”бü‚Mä,“ê/éÚÛ‰”ЬÝÛ‰”ŠÚÛ‰”ŠÕÝÛ‰”Šüî"


ö¼øá”Š6üÔ=å%Hᔊ¬ºŒºß”Š Î9 6ß”Š4lü° 

¯Œ˜% Ïü–;æÓ§‹Û4Õß”Šäß”Šüö*üö!
t‡
ÙÍ„ö唊„‡L Ÿüö. £% 'KKüÖOçéç§‹;Ö唊äÕ!
ÔÕ!
˜*üÕ!  ô!% 'KKüµ!Aõ,Í!µ§‹4$³"tº" º"
"T¼"
ÖÍ0d¼" Ç"œº" Ì",×" ß"Œß"
 lá"
ØÍ2|á" ï"üû"(´ü"t„# ,„#

 
 #
9 ,ü"õ U  !õ u S l•# $•#

 
 ¡#
Ä Õ  ì ¢# üö"-@#  ö"H#t ¤#¥#öüø!­ü¯"vüÓ"R,£" "//ïîîî§‹§‹(&|pow2ÁzerosÁ­Ñõ+õ 32Á4096ÁLš& ¢&3 ,š&õN õXü&#ú,&+iõtõ0b00Á0b01Á0b11Áüœ  T õ„ª â‡d3 /õ-â‡d_üœ - ݺn‡d& (ݺn‡dM È ü‰ Aƒ,” ù§‹§‹œ=õâ‡dõâ‡dÎݺn‡dàݺn‡dl®© 
¢\Ë© 
‡d˜~ü˜©E
ù‡d Ü© üƒ©[תp$‘©¦mŠ PhantomDataÁÑ{·Ë…YÚퟳf|ª 
¢\¯ª 
íŸüú©G
ù‡d Àª üã©_تp$ó©¦mŽÕ |6tóª 
¢\‘« 
íŸüݪF
ù‡d ¢« üǪ]Ùªp$Öª¦mŽÕ |6üÚ²,
œÛ²Úªp‡d¤ñ²Úºn‡dA <Úªp‡d9Úºn‡dxüͲ9TͲõ! "õA …³üº²Mê,Ų §‹§‹@Úªp‡dÚºn‡d9Úªp‡d6Úºn‡dÞõéõtÒµTҵܑq‡d ßµ9 ;Üq‡d8oü´µ-ð,ʵ§‹¨/§Ü‘q‡d¹Ü‘q‡d¤Ö¿ Úºn‡düÿ(ˆ,ο'KÚºn‡dGeneration<C>::LENÁܱs‡d ©6 9ܱs‡d7lüˆ#½,”§‹£-£Ü±s‡dµÜ±s‡düƒ
"
à‡dœ’
ç‡d0 2à‡d0ç‡d_üð 6Æ §‹-à‡dç‡d±à‡d®ç‡d
½‚_üÒ$ç%E½_
Addr<C>::NULLÁùõ
¼X
éõ
¼X
xùõ
ÚúXÝø°ú°û°Ðü°ý°þ°ìHˈXêE> ø°ú°û°Ðü°ý°þ°ìHˈXêE>x xž¯±áùô
ÒvTÛʲM¨Þ@§ xáô
ävTYÝž¯ž¯ùõ
õX
éõ
õX
¨x17ùõ
«®X

Þ£¯´°˜~2ž¯ õ
ÄXùõ
òÔXùõ
‡!­X

à­²˜~%ž¯ õ
 !XR õ
Å$Xùõ
àôXÝž¯!#Þ­²˜~óà­²˜~¨Wüð'ôð
Öæ‡d„þG üð+ š% 'KKüÝ?¬äâ§‹;Õæ‡ddŽs
ä‚_üñr*þ,†s%Dä_ C::USED_BITSÁ,Ä‘|Ñ‘ LÒ‘Ú”Š‚_ Þ‘@ <Ú”Š_9w¤Ì‘@#  Ì‘I$ ß‘,ê‘ \ò‘,ó‘  û‘@ (f ü‘œê‘
! ‚’ü¢‘bÜüÀ‘C ,®‘ëê§‹ót ÿ§‹shiftÁ3%Ú”Š‚_9Ú”Š‚_üö“#Œö“Ý”Š‚_Û‚_|Š”Úͼ‚_G HÝͼ‚_;Úͼ‚_üá“9Ý,î“§‹¹/·Ýͼ‚_©Úͼ‚_ÝÝͼ‚_ÏÚͼ‚_ÌÉ•\וÝ”Š‚_#@7 TɕܔЂ_MÝ”Š‚_p7ܔЂ_Ý”Š‚_üµ•.Þ,Á•É-ÈÝ”Š‚_¥Ü”Š‚_îÝ”Š‚_ËܔЂ_Ý”Š‚_ü¿
ôü^õ)üd4Ç.Ç.ÕIÉ.˜¸+ö)=ê „9Ûü^ho´¬
ý‡dþ(£r3ºn:Aì¤
·ü^‚_¸+âu6çZçZ\éZÓZ{Ð%¶Òýûû‘Jý˜ÍØ6†âãäv˜Ÿüû9
ÀÏ`Õ`!Á.ÀÀÁÎNÅì¯ W§1coÊÏ`Õ`oñiñiÎNôi÷ ®iõi
end_or_lenÁ®iöi_markerÁ®iÇzRhgQ··¸‹N»ì¯ <ܚߊ¢Ï`Õ`
œ»
ËÌ%x0É,É,qË,˜¸+»\¡Ø Êø°ú°û°Ðü°ý°þ°ìHˈXêE>§®Ôœ¾Ð¯âçïØâ 4ŒHÞÕŸIl”HîÖã,¯H¢××JTÀHØ $ìHÙ£=‡I¢ÚT–IãÛ§6,­IÄÜ;Iï+ÞãŸ\ËIß㟊ß÷ ØIêàIãI“7áüÜü  A lock-free concurrent slab.Á!Ëü%KH Slabs provide pre-allocated storage for many instances of a single dataÁüqFC type. When a large number of values of a single type are required,Áü¸PM this can be more efficient than allocating each item individually. Since theÁü‰KH allocated items are the same size, memory fragmentation is reduced, andÁüÕ63 creating and removing new items can be very cheap.ÁŒËüKH This crate implements a lock-free concurrent slab, indexed by `usize`s.ÁÜË ## UsageÁíËüñ)& First, add this to your `Cargo.toml`:ÁË ```tomlÁÔ« sharded-slab = "0.1.1"Á ```ÁÎËüÒHE This crate provides two types, [`Slab`] and [`Pool`], which provideÁü›52 slightly different APIs for using a sharded slab.ÁÑËüÕNK [`Slab`] implements a slab for _storing_ small types, sharing them betweenÁü¤FC threads, and accessing them by index. New entries are allocated byÁüëFC [inserting] data, moving it in by value. Similarly, entries may beÁü²LI deallocated by [taking] from the slab, moving the value out. This API isÁüÿNK similar to a `Vec<Option<T>>`, but allowing lock-free concurrent insertionÁ„Î
and removal.ÁßËüãJG In contrast, the [`Pool`] type provides an [object pool] style API forÁü® OL _reusing storage_. Rather than constructing values and moving them into theÁüþ OL pool, as with [`Slab`], [allocating an entry][create] from the pool takes aÁüÎ
OL closure that's provided with a mutable reference to initialize the entry inÁüž KH place. When entries are deallocated, they are [cleared] in place. TypesÁüê JG which own a heap allocation can be cleared by dropping any _data_ theyÁüµ MJ store, but retaining any previously-allocated capacity. This means that aÁüƒ
NK [`Pool`] may be used to reuse a set of existing heap allocations, reducingÁœÒ
 allocator load.Áæ
Ëìê
 [inserting]: Slab::insertÁĈ [taking]: Slab::takeÁÔ¡ [create]: Pool::createÁ¤¼ [cleared]: ClearÁüÑDA [object pool]: https://en.wikipedia.org/wiki/Object_pool_patternÁË # ExamplesÁ©Ëü­85 Inserting an item into the slab, returning an index:Á ```rustÁìò # use sharded_slab::Slab;ÁÜ let slab = Slab::new();Á¬Ëü°2/ let key = slab.insert("hello world").unwrap();Áüã63 assert_eq!(slab.get(key).unwrap(), "hello world");Á¡Ï¢Ëü¦B? To share a slab across threads, it may be wrapped in an `Arc`:Á«Üìõ¾Ü¼“ use std::sync::Arc;Áü«%" let slab = Arc::new(Slab::new());ÁÑËìÕ let slab2 = slab.clone();Áüó.+ let thread2 = std::thread::spawn(move || {Áü¢A> let key = slab2.insert("hello from thread two").unwrap();ÁüäEB assert_eq!(slab2.get(key).unwrap(), "hello from thread two");Á keyÁ });Á¾ËüÂ=: let key1 = slab.insert("hello from thread one").unwrap();Áü€A> assert_eq!(slab.get(key1).unwrap(), "hello from thread one");ÁÂËüÆ%" // Wait for thread 2 to complete.Áüì'$ let key2 = thread2.join().unwrap();ÁËü˜96 // The item inserted by thread 2 remains in the slab.ÁüÒA> assert_eq!(slab.get(key2).unwrap(), "hello from thread two");Á4”```ÁËüŸOL If items in the slab must be mutated, a `Mutex` or `RwLock` may be used forÁüïKH each item, providing granular locking of items rather than of the slab:Á»Ë\¿«Üì˾Üüé  use std::sync::{Arc, Mutex};ÁüŠ%¥ß°Ëü´LI let key = slab.insert(Mutex::new(String::from("hello world"))).unwrap();ÁËì…Ýßü£.ƒàüÒ:7 let hello = slab2.get(key).expect("item missing");Áü>; let mut hello = hello.lock().expect("mutex poisoned");ÁüÌ1. *hello = String::from("hello everyone!");ÁäáËäŠ thread2.join().unwrap();Á§Ëü«52 let hello = slab.get(key).expect("item missing");Áüá:7 let mut hello = hello.lock().expect("mutex poisoned");Áüœ2/ assert_eq!(hello.as_str(), "hello everyone!");Á¡Ï×ËœÛ # ConfigurationÁïËüóNK For performance reasons, several values used by the slab are calculated asÁüÂPM constants. In order to allow users to tune the slab's parameters, we provideÁü“MJ a [`Config`] trait which defines these parameters as associated `consts`.Áüá<9 The `Slab` type is generic over a `C: Config` parameter.Áž Ëü¢ ! [`Config`]: trait.Config.htmlÁÄ ËüÈ $! # Comparison with Similar CratesÁí Ëüñ PM - [`slab`]: Carl Lerche's `slab` crate provides a slab implementation with aÁüÂ!FC similar API, implemented by storing all data in a single vector.Á‰"Ëü"JG Unlike `sharded_slab`, inserting and removing elements from the slabÁüØ"GD requires mutable access. This means that if the slab is accessedÁü #NK concurrently by multiple threads, it is necessary for it to be protectedÁüï#HE by a `Mutex` or `RwLock`. Items may not be inserted or removed (orÁü¸$FC accessed, if a `Mutex` is used) concurrently, even when they areÁüÿ$PM unrelated. In many cases, the lock can become a significant bottleneck. OnÁüÐ%JG the other hand, this crate allows separate indices in the slab to beÁü›&MJ accessed, inserted, and removed concu
slab_printÁTQ ] ¬
8k8n'q8ç4s'y8¡ L{    8printlnÁ ® ¯ ó
7[PANIC {:>17}:{:<3}] {}Á̰$ É8À Ï Ð Ñ$ Ò8È  Ø Ù Ú$ Û8â è é ò, ê ë ð, ì8ÿœí
ñ8 ˆ ¢8ðž ¡ ¢ 7[{:?} {:>17}:{:<3}] {}ÁÄ£$ »8'Â8£=Ä'Ç É8'Ï8ŸI Þ'ß8‰; è é$ ê8À ð ñ ò$ ó8È  ù ú û$ ü8â  Š ,  Œ , 8ÿœŽ
Ô” ¯ ö
 µ Á,  · ¿, ¸8ÿœ¹& ¼8½
À*Ã Æ ô
 8Ð Ó8Ô'×8ç'ß8¡  ê ë í 8õ    Š,  ƒ ˆ, 8ÿœ
8$–  î
8©8ç ´8'¹8ç'Á8‰; Ê Ë% Ì8eprintlnÁ â ã ã
$7thread '{thread}' attempted to panic at '{msg}', {file}:{line}:{col}\n\
note: we were already unwinding due to a previous panic.Áüõ$ 8ç4™   8ç ¨ 8ÿ
 ­ ®  ¯ 8 ¹ Å 7 <unnamed>Á$ Æ 8msgÁØ Ü 8â é  ê ó , ë  ì ñ , í 8ÿœî 
ò $ ô 8À$†
8À$


$
8È
«
8È $­
 ±
 ²
³
$ ´
8colÁÆ
Ê
8ä
 Ò
 Ó
Ô
$ Õ
% ä
üù
$¼†  ž Ù  ¤ »  , ¥ 8thisÁ & ª 8ï $ ¯ , ± 8thatÁ & 8ï *½  À 8
¼Ê  á  â ú   ã 8² , ê 8ß« $ ï , ñ 8ެ $ ö 7Ëø %  « 
, ˆ 8ß«$‰ & 8ï $ , 8ެ$• & 8ï $ ž ,    ¡ © , ¢ 8ÿœ£ & ¦ 8§  ª *­  ° š
8
¼º  Ñ  Ò
  Ó 8² , Ú 8ß« $ ß , á 8ެ $ æ 8â  ó  ô
7: {}Á $ û 8â  ˆ

, Š

, Œ
8ÿœ

%
 ¡
Ê
 ¢
8²
, ©
8ß«
& ®
8ï
$ ³
, µ
8ެ
& º
8ï
$ ¿
, Á
8›©Â
& Å
8ï
*Ì
 Ï
×8Ù
8¢Ü
 ß
 à
ñ
8ç„á
 ó
Ñ8, 8ß«$…Š, 8ެ  Ç8û  ² ³ ¹7>assertion failed ({} == {})\n left: `{:?}`,\n right: `{:?}`{}ÁüÉ@$ 8µ ¨ © ¯, ª8ß«$ °8µ Ï Ð Ö, Ñ8ެ$ ×, í8ß«$ ò, ˆ8ެ$‰$ , £8›©¤$ §´íFü`8
5 Notes on `sharded-slab`'s implementation and design.Á
Ëd
# DesignÁª
蟨L
I The sharded slab's design is strongly inspired by the ideas presented byÁüûB
? Leijen, Zorn, and de Moura in [Mimalloc: Free List Sharding inÁü¾O
L Action][mimalloc]. In this report, the authors present a novel design for aÁüŽ@
= memory allocator based on a concept of _free list sharding_.ÁÏ
ËüÓN
K Memory allocators must keep track of what memory regions are not currently矢N
K allocated ("free") in order to provide them to future allocation requests.ÁüñN
K The term [_free list_][freelist] refers to a technique for performing thisÁüÀO
L bookkeeping, where each free block stores a pointer to the next free block,ÁüK
H forming a linked list. The memory allocator keeps a pointer to the most矆O
L recently freed block, the _head_ of the free list. To allocate more memory,Áü¬L
I the allocator pops from the free list by setting the head pointer to theÁüùO
L next free block of the current head block, and returning the previous head.矃N
K To deallocate a block, the block is pushed to the free list by setting itsÁü˜ P
M first word to the current head pointer, and the head pointer is set to pointÁüé O
L to the deallocated block. Most implementations of slab allocators backed byÁü¹
M
J arrays or vectors use a similar technique, where pointers are replaced byÁü‡ #
indices into the backing array.Á«
Ëü¯ M
J When allocations and deallocations can occur concurrently across threads,Áüý J
G they must synchronize accesses to the free list; either by putting theÁüÈ M
J entire allocator state inside of a lock, or by using atomic operations toÁü–
P
M treat the free list as a lock-free structure (such as a [Treiber stack]). InÁüç
N
K both cases, there is a significant performance cost — even when the freeÁü¶L
I list is lock-free, it is likely that a noticeable amount of time will beÁüƒM
J spent in compare-and-swap loops. Ideally, the global synchronzation point矄P
M created by the single global free list could be avoided as much as possible.Á¢
Ëü¦H
E The approach presented by Leijen, Zorn, and de Moura is to introduceÁüïP
M sharding and thus increase the granularity of synchronization significantly.ÁüÀF
C In mimalloc, the heap is _sharded_ so that each thread has its ownÁü‡N
K thread-local heap. Objects are always allocated from the local heap of theÁüÖL
I thread where the allocation is performed. Because allocations are always矣C
@ done from a thread's local heap, they need not be synchronized.Áç
ËüëM
J However, since objects can move between threads before being deallocated,Áü¹J
G _deallocations_ may still occur concurrently. Therefore, Leijen et al.Áü„M
J introduce a concept of _local_ and _global_ free lists. When an object isÁüÒO
L deallocated on the same thread it was originally allocated on, it is placed矢N
K on the local free list; if it is deallocated on another thread, it goes onÁüñP
M the global free list for the heap of the thread from which it originated. ToÁüÂK
H allocate, the local free list is used first; if it is empty, the entireÁüŽM
J global free list is popped onto the local free list. Since the local free矆O
L list is only ever accessed by the thread it belongs to, it does not requireÁü¬K
H synchronization at all, and because the global free list is popped fromÁüøN
K infrequently, the cost of synchronization has a reduced impact. A majority矂D
A of allocations can occur without any synchronization at all; andÁüŒJ
G deallocations only require synchronization when an object has left itsÁü×/
, parent thread (a relatively uncommon case).Á
Ëü‹`
] [mimalloc]: https://www.microsoft.com/en-us/research/uploads/prod/2019/06/mimalloc-tr-v1.pdfÁüì7
4 [freelist]: https://en.wikipedia.org/wiki/Free_listÁü¤@
= [Treiber stack]: https://en.wikipedia.org/wiki/Treiber_stackÁå
ˤé
 # ImplementationÁþ
Ëü‚J
G A slab is represented as an array of [`MAX_THREADS`] _shards_. A shardÁüÍI
F consists of a vector of one or more _pages_ plus associated metadata.Áü—O
L Finally, a page consists of an array of _slots_, head indices for the localÁÔç
 and remote free lists.Á
Ë\†
 ```textÁü’ 1
. ┌─────────────â”Á¼Ä
 │ shard 1 │ÁüÜ n
k │ │ ┌─────────────┠┌────────â”ÁüË!Z
W │ pages───────┼───▶│ page 1 │ │ │Áü¦"Ž
 ├─────────────┤ ├─────────────┤ ┌────▶│ next──┼─â”Áüµ#Z
W │ shard 2 │ │ page 2 │ │ ├────────┤ │Áü$d
a ├─────────────┤ │ │ │ │XXXXXXXX│ │Áüõ$b
_ │ shard 3 │ │ local_head──┼──┘ ├────────┤ │ÁüØ%l
i └─────────────┘ │ remote_head─┼──┠│ │◀┘ÁüÅ&f
c ... ├─────────────┤ │ │ next──┼─â”Áü¬'t
q ┌─────────────┠│ page 3 │ │ ├────────┤ │Áü¡(d
a │ shard n │ └─────────────┘ │ │XXXXXXXX│ │Áü†)p
m └─────────────┘ ... │ ├────────┤ │Áü÷)`
] ┌─────────────┠│ │XXXXXXXX│ │ÁüØ*V
S │ page n │ │ ├────────┤ │Áü¯+b
_ └─────────────┘ │ │ │◀┘Áü’,]
Z └────▶│ next──┼───▶ ...Áüð,L
I ├────────┤Áü½-<
9 │XXXXXXXX│Áüú-L
I └────────┘Á<Ç.
¡ÏÏ.
ËÓ.
Ëü×.M
J The size of the first page in a shard is always a power of two, and every矴/L
I subsequent page added after the first is twice as large as the page thatÁ„ò/
preceeds it.Áƒ0
Ë\‡0
óØ“0
Ë<—0
 pg.ÁüŸ0%
" ┌───┠┌─┬─â”ÁüÅ0!
 │ 0 │───▶ │ │Áüç01
. ├───┤ ├─┼─┼─┬─â”Áü™1)
& │ 1 │───▶ │ │ │ │ÁüÃ1I
F ├───┤ ├─┼─┼─┼─┼─┬─┬─┬─â”Áü29
6 │ 2 │───▶ │ │ │ │ │ │ │ │ÁüÇ2y
v ├───┤ ├─┼─┼─┼─┼─┼─┼─┼─┼─┬─┬─┬─┬─┬─┬─┬─â”ÁüÁ3Y
V │ 3 │───▶ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │Áü›4y
v └───┘ └─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┘Á<•5
¡Ï5
Ëü¡5O
L When searching for a free slot, the smallest page is searched first, and ifÁüñ5P
M it is full, the search proceeds to the next page until either a free slot isÁüÂ6P
M found or all available pages have been searched. If all available pages haveÁü“7M
J been searched and the maximum number of pages has not yet been reached, aÁüá7
 new page is then allocated.Á8
Ëü…8O
L Since every page is twice as large as the previous page, and all page sizesÁüÕ8L
I are powers of two, we can determine the page index that contains a given矢9F
C address by shifting the address down by the smallest page size andÁüé9G
D looking at how many twos places necessary to represent that number,Áü±:D
A telling us what power of two page size it fits inside of. We canÁüö:I
F determine the number of twos places by counting the number of leadingÁüÀ;I
F zeros (unused twos places) in the number's binary representation, andÁüŠ<C
@ subtracting that count from the total number of bits in a word.ÁÎ<
ËüÒ<P
M The formula for determining the page number that contains an offset is thus:Á£=
Ë”§=
 ```rust,ignore矼=I
F WIDTH - ((offset + INITIAL_PAGE_SIZE) >> INDEX_SHIFT).leading_zeros()Á<„>
¡ÏŒ>
Ëü>J
G where `WIDTH` is the number of bits in a `usize`, and `INDEX_SHIFT` isÁÛ>
Ë”ß>
Òùüò>+
( INITIAL_PAGE_SIZE.trailing_zeros() + 1;Á<ž?
¡Ï¦?
蟻?v
s [`MAX_THREADS`]: https://docs.rs/sharded-slab/latest/sharded_slab/trait.Config.html#associatedconstant.MAX_THREADSÁtõFd…Gü'$ A lock-free concurrent object pool.Á(Ëü,ZW See the [`Pool` type's documentation][pool] for details on the object pool API and howÁü‡%" it differs from the [`Slab`] API.Á­Ëü± [pool]: ../struct.Pool.htmlÁüÑ! [`Slab`]: ../struct.Slab.htmlÁ$G$+1¢Ô Tã ŸIlœî
㢡Ðà ¯£=Ø¢ÕG$áØ§6,çÄÜÍüï+ãŸ\‰ãŸŠIœ“7ü÷xôöåçd°ÚÉ˺¼DÓ¯ž ‘üö*ƒœuL–Uüô%ü£'”ýËËüÏc` Slabs provide pre-allocated storage for many instances of a single type. But, when working withÁü³^[ heap allocated objects, the advantages of a slab are lost, as the memory allocated for theÁü’_\ object is freed when the object is removed from the slab. With a pool, we can instead reuseÁüò\Y this memory for objects being added to the pool in the future, therefore reducing memoryÁüÏ63 fragmentation and avoiding additional allocations.ÁËüŠc` This type implements a lock-free concurrent pool, indexed by `usize`s. The items stored in thisÁüî30 type need to implement [`Clear`] and `Default`.Á¢Ëü¦`] The `Pool` type shares similar semantics to [`Slab`] when it comes to sharing across threadsÁü‡ `] and storing mutable shared data. The biggest difference is there are no [`Slab::insert`] andÁüè b_ [`Slab::take`] analouges for the `Pool` type. Instead new items are added to the pool by usingÁüË
WT the [`Pool::create`] method, and marked for clearing by the [`Pool::clear`] method.Á£ Ë ÉÛ Ëüº 1. Add an entry to the pool, returning an index:Á ¡Ïìô  # use sharded_slab::Pool;Áü’ )& let pool: Pool<String> = Pool::new();Á¼ ËüÀ MJ let key = pool.create_with(|item| item.push_str("hello world")).unwrap();ÁüŽ
DA assert_eq!(pool.get(key).unwrap(), String::from("hello world"));Á
¡ÏÛ
Ëüß
KH Create a new pooled item, returning a guard that allows mutable access:Á¡Ïì³È‹üÑ)î‹ûËüÿ+( let mut guard = pool.create().unwrap();ÁÔ« let key = guard.key();ÁüÆ" guard.push_str("hello world");ÁéËüíA> drop(guard); // release the guard, allowing immutable access.Áü¯D¡ÏüËü€SP Pool entries can be cleared by calling [`Pool::clear`]. This marks the entry toÁüÔ=: be cleared when the guards referencing to it are dropped.Á<¡ÏìšÈ‹ü¸)î‹âËüæM«Œ´Ëü¸%" // Mark this entry to be cleared.Á¤Þ pool.clear(key);ÁóËü÷;8 // The cleared entry is no longer available in the poolÁü³%" assert!(pool.get(key).is_none());Á¡ÏœáìõËüùpm Both `Pool` and [`Slab`] share the same configuration mechanism. See [crate level documentation][config-doc]Á¬ê for more details.ÁËü„%" [`Slab::take`]: crate::Slab::takeÁüª)& [`Slab::insert`]: crate::Slab::insertÁüÔ" [`Pool::create`]: Pool::createÁü÷  [`Pool::clear`]: Pool::clearÁü˜%" [config-doc]: crate#configurationÁܾ [`Clear`]: crate::ClearÁÌÚ [`Slab`]: crate::SlabÁ$ÿk©âü^ ©â‚_Œ‡¢ü^Äü^Þ_\¿É^¦JùSzÞ ÂY[V Î_ÔÒµw¤òŠãŸÑ{·Ë…YÚ‚_ü»(ü‹63 A guard that allows access to an object in a pool.ÁÂËüÆZW While the guard exists, it indicates to the pool that the item the guard references isÁü¡^[ currently being accessed. If the item is removed from the pool while the guard exists, theÁü€:7 removal will be deferred until all guards are dropped.ÁÆà k  ©âÏ` ΩâÕ`ŒÑ¢Ï`ÄÏ`ÞÕ`\‰Ï`à ´ÀÕ`à Œ`©Ìw—‹z†8!"#jÊ|~y ÑÎ_ôœÆKË×ôÔò¹8ªÏ`Õ`—,À à Äħ6ÇÃ6ÈÛ ¯ÉÖ6¯pɵ ¾ï´Ï`Õ`Üüü+üëHE A guard that allows exclusive mutable access to an object in a pool.Á´Ëü¸LI While the guard exists, it indicates to the pool that the item the guardÁü…PM references is currently being accessed. If the item is removed from the poolÁüÖIF while a guard exists, the removal will be deferred until the guard isÁü NK dropped. The slot cannot be accessed by other threads while it is accessedÁ mutably.Á4‡ à %&k'&'%Šž šžŒ• ªž¹žÈžמ´ˆ!åž‚aÀžmì¾ÒS()*Ž TVY Î_üà "$$˜˜†LËל®L×ÄL×Ê“æn¿P*iÏ`Õ`«,ˆ!$$ T¤!¤!$$üà6)ü³!NK An owned guard that allows shared immutable access to an object in a pool.Á"Ëü†"ZКüá"^³›üÀ#:šœû#Ëüÿ#JG Unlike [`Ref`], which borrows the pool, an `OwnedRef` clones the `Arc`ÁüÊ$NK around the pool. Therefore, it keeps the pool from being dropped until allÁü™%PM such guards have been dropped. This means that an `OwnedRef` may be held forÁÔê% an arbitrary lifetime.Á…&ˉ&Ët&ÉÛœ&Ë< &¡Ïì¨&È‹
ü©-* The size of the first page in each shard.ÁÛËüãB? When a page in a shard has been filled with values, a new pageÁüªLI will be allocated that is twice as large as the previous page. Thus, theÁüûIF second page will be twice this size, and the third will be four timesÁÌÉ  this size, and so on.Áç Ëüï LI Note that page sizes must be powers of two. If this value is not a powerÁüÀ
85 of two, it will be rounded to the next power of two.ÁŒƒ ÞÞÔµüÄ JG Sets a number of high-order bits in each index which are reserved fromÁt“  user code.Á¦ Ëü® KH Note that these bits are taken from the generation counter; if the pageÁüþ HE address and thread IDs are configured to use a large number of bits,ÁüË
HE reserving additional bits will decrease the period of the generationÁü˜KH counter. These should thus be used relatively sparingly, to ensure thatÁüèHE generation counters are able to effectively prevent the ABA problem.Ál»ÞÞüØ#ããªâ”Šü؃ޔŠã¿‘*Ò‘¿‘6Ò‘åæçèéêëíîïäåæçèéêëíîïèêïëéíî´‚ãã¼Ôãã¼–ããìÖ„Üããü«ãã
蔊­˜ ¸ü†,‰òòÙô® ÔÊ„¦™_1ýM”Šãã
锊˜~ãã
ꔊü¸,ãììã©âÔ• ÂØÔ•”Š
딊ԕó -/ü§+··†-¹™-к® Ðà¥÷G”Æ™”Šãã
픊ó ü“0T–¢¢£=¤µ=¥¿=¦® Š”lî±ÖÙ9”Šãã
ó ü„0T‡Û‰ãã
ó 4’üÜ kññ©â‡d áÞ‡d‡düé (kóó±™ ‡!Á™4Š!ÅdÊ„¦™_1ýMô$&Ę!$˜!ÔòòÕ ìµ!,Æ!üø!0LŒ"¯Œ­˜´KìÆ#Î_øùúáßàôê#Œð#÷÷ļ$»–$ ™$ µ$8Ù¤š$ ¯$764Á$±$ü”$#\Â$÷÷´&L‡&÷÷ü¨&!Î_üá`üüÐ&8Ó& ž Ÿ   Î_ ž Á`Á`œÃ`è Á]Ä`ÎfÁ]Ê­\É:•Ÿ ø¶û ×&û
ü$Ø&þ Þ&ü±'-kþþ±™ ¶'Á™4¹'Ådÿá`ÿüå'8è'  ¡ ¢    Åd ¡ Á`Á`œÃ`è Á]Ä`ÎfÁ]Ê­\É:•¢ ø¶ý ì'ý
ÿ‡d$í'þ ó'œ¨G$·G²Šáă¹ÓZ˾: yield_nowÁL† úˆèd™ŽÕITNô\
»¹
 ¼
 è
8Æ ½
 À
 ç
8àÁ
 Ä
 æ
8¾
$ É
8÷Ë
 Î
 å
8
 ×
7¾
$ ß
8à
ü·
3
ŠôõÄSƒ¹NÓZËI¾:˜ < úˆè7ŽÄ£µüÐ\§ª˜Œþ~ilœ³Ìë˜~
¬ÿŸ™ üdŽüŸ$¦ü^üdŒŒ
Žü^ðh$ªü¬W£  £ üdÄÍŒÄÍ ¾Œ©â›¦ ¸©â ¦ »›¦ ü^¬í›¦†§ ¦ 
ü^›¦ ¦$¿þ Åbd^`ü×Y¤  ¤ üd›¦ ¦ŒÄÍ íŒÙ¦ çê¦ ê›¦ ü^œœ›¦è¨ ¦ ®
ü^›¦ ¦þ ôY[^`¤ìû„›Ÿ™  ·e˜šü€ ü^·e
˜ü^˜,‹Ü©¥  ¥ ·e ¥ ü^ ¸
ü^üÑ#¦  ¦ ·e ¦ ü^ à
šü^ä‚T‰
 œž¢$ ÈœŸDerefMutÁD" ùœ Â$, ù/œ¡ü- Y[IKl 4"$|Õ
ü4K H Trait implemented by types which can be cleared in place, retaining anyÁ¬€  allocated memory.Á ËüšG D This is essentially a generalization of methods on standard libraryÁüâI F collection types, including as [`Vec::clear`], [`String::clear`], andÁü¬M J [`HashMap::clear`]. These methods drop all data stored in the collection,ÁüúM J but retain the collection's heap allocation for future use. Types such asÁüÈC @ `BTreeMap`, whose `clear` methods drops allocations, should notÁÌŒ  implement this trait.Á¦ ËüªJ G When implemented for types which do not own a heap allocation, `Clear`ÁüõN K should reset the type in place if possible. If the type has an empty stateÁüÄM J or stores `Option`s, those values should be reset to the empty state. ForÁü’P M "plain old data" types, which hold no pointers to other data and do not haveÁüãM J an empty or initial state, it's okay for a `Clear` implementation to be aÁü±N K no-op. In that case, it essentially serves as a marker indicating that theÁü€) & type may be reused to store new data.Áª Ëü®Y V [`Vec::clear`]: https://doc.rust-lang.org/stable/std/vec/struct.Vec.html#method.clearÁüˆ b _ [`String::clear`]: https://doc.rust-lang.org/stable/std/string/struct.String.html#method.clearÁüë i f [`HashMap::clear`]: https://doc.rust-lang.org/stable/std/collections/struct.HashMap.html#method.clearÁ
¢¢¿‘üÕ
q ¢¿‘¿‘£££¤° üë
@ = Clear all data in `self`, retaining the allocated capacithy.Á,³ §  § ”Š˜~¢ ¹ ¢
£”Š ÜÈ ¥¥Ÿ™ Í øe¦£¦œê ¨  ¨ øe˜~¤ ó ¤
¦ü^ ü¦ , ¨¨Ÿ™ « ¿™ Æf©£©œç ©  © Æf˜~§ ð §
©ü^ ħ
««Ÿ™ ¬
»g¬£¬œÔ
,×
ª  ª »g˜~ª Ý
ª
Ÿ^
üŒm ¼®Å¯Î°¯®°©âµh  ©â»h  ©âÁh  »bµh £µhÜ æbÁhŒç „h±£±_a\^Y[œŽ ,‘ «  « „h˜~­  ­
±µh»hÁh ü×g ³Î´´³Ÿ™ Ü ©âþh ß »bü^T” £ü^¡ æbþhŒ¬ Îhµ£µOQLNœÓ  ¬  ¬ Îh˜~² Ü ²
µü^þh ¬œ ‹i·£·œÆ  ­  ­ ‹i˜~ Ï 
· ü' ¹¹Ÿ™  ¿™,‰ ¿iº£ºœ½  ®  ® ¿i˜~¸ Æ ¸
ºü^ ü…( ¼¼Ÿ™ Š ¿™, ˜j½£½œÂ  ¯  ¯ ˜j˜~» Ë »
½ü^ DÉG$ÍG£l ÖN¾Àî, ·1¾Á¢4 Ծá$9 оÄà ,? ¯¾Åü! œ
hVXÌ, IK9;)+üÈ= à ÇÈkÉÇÈÉŠž Ñ šž Ô Èž çjÊËßKàKËÍ /146 $‘ ÆÆ à Ï`ü¤(  °  ° çjø°ú°û°Ðü°ý°þ°ìHˈXêE>çjßKÆ ¬ Æ
Ëà Ï`Õ`  ˃òÌ›ò̸òÌÌËÌÏ`Õ` ¢¢ FilterMapÁÅ¢£ ¦8Æ¢þ¦814ßhø·µÙiÙi¨.Üi÷ ®iÝiòÄ®iÞiˆÅ®it¸%ýN(êê±íÌ×î¥ ×ï¡ ×ð® ×tvÔý³Nø°ú°û°Ðü°ý°þ°ìHˈXêE>Ï`Õ` ñËø°ú°û°Ðü°ý°þ°ìHˈXêE> Ï`•͘~ü­ > 8± ÎkÏϱ Ίž ² šž µ Èž ÆkDÓG$×G×·ÀÊÎÐ×­¢$ÔÐÒTãÐÓã,6¢ÐÔÕIáôÐÕÕG$eØÐÖ±ê³Í·ï+еãŸÐ㟊Ðô½ ®°œ(¡¼As\^€œl${êñõùýþ˜¢Õ-D Àרb\5®¸×ÛÕDBд×ܲ$QŠ×ÝÕITWô×Þ¢rÔ×àã,~¢×áÕG$…Ø×â£=¢×ãÚÍï+×åãŸ×æãŸŠ×æmemÁµÕ×ç÷ ºê×èç4¿ÿ×é|FüK<?-0! üj%þdwòàâÏÑü•1¿Áœ ±tvceäÉëkìë쟙 ௙ ã€otvÔý³Níîïð*,/1´ì×êꮸ®¸b¯¸ÓZiVwƒ'¼¾×êêôôõÕI÷ì L| 最$€×êêüdÄ™$™×êêŠãŸÑ{·Ë…YÚ‚_˜~üò4T„kòò±™´ºné„©sM!Ýóô Î_×ññÄ¿$¿×ññÕ üñ2köö±™´Œ‘qCLÎ3£(‹÷ø ŒÎ_×õõļ×õõÕ ôÙkúú±™ õªpø]î¡Ðhäûü ×ùù¦mÄ$×ùùÕ ä`×kÿÿ±™ À£rp?ã°þºn£rä`M׺n£rýý
þ‡ddf×ýýºnüÜ .k±™ á Á™ºnƒÚÛàß35„‰    „yüÿ T‚ ºn
‡d Üÿ D‚
²  ² ºn

‡d
ü¹
"kˆˆ±™ ¾
Á™
ºn‰äâ
å
׺n
‡d˜
ü/kŒŒŸ™ ¯™ Ý™€oš,.13üÛ"г  ³ €oŠ îŠ
ü^‚_4—ƒòŽ›òޏòŽŽŽü^‚_ ˜~üÑ ´  ´ €o ´ ü^Š åŠ
ü^‚_4‹ƒò›ò¸òü^‚_†§ ü^˜~üÆ*е  µ €o˜~Š ÝŠ
ü^‚_¥ Žƒò›ò¸òü^‚_ ˜~Ž˜üàCî ¶ €oññõó˜×ô® ×é„©sM!Ý‚_Ä—Š òŠ
ü^‚_5ùüó&:dö&×·  · €oœåø°ú°û°Ðü°ý°þ°ìHˈXêE>Š ƒ'
üÀ°#kææ±™ Űªpçá`çüê°8í°Û Ü Ý  Û ªp Ü Á`Á`œÃ`è Á]Ä`ÎfÁ]Ê­\É:•Ý ø¶å ñ°å
ç‡d$ò°þ ø°ü‡²,kéé±™ Œ²Á™\²‘qêëìíÚÛàßìí57„º²À²èèLŒ³$‘³èèªpü«³#T®³‘qèè
ì‡d˜,¹³ÜÓ´DÖ´Þ  Þ ‘qè ß´è
í‡d$à´üµ kïï±™ ’µÁ™\•µ‘qðñòÜ´µŵîîìõµ$øµ×‘qø°ú°û°Ðü°ý°þ°ìHˈXêE>qîî
ñ‡d$ýµ¬÷·$ú·×‘q‘qîî
ò‡d$ÿ·üÁ¸"kôô±™ Ƹ‘qõá`õüê¸8í¸ß à á  ß ‘q à Á`Á`œÃ`è Á]Ä`ÎfÁ]Ê­\É:•á ø¶ó ñ¸ó
õ‡d$ò¸þ ø¸üì¹.k÷÷±™ ñ¹Á™\ô¹‘qø øü¡º"¤ºâ ã  â ‘q ã ‘qö §ºö
ø‡d$¨ºî ,®ºüñº'kúú±™ öºÁ™\ùº‘qü»/küü±™ ¢»Á™\¥»‘qýËýüÓ»A\Ö»ä å  ä ‘q å ‘q†‡û â»û
ý‡d$ã»î ,é»üͼ(kÿÿ±™ Ò¼Á™\Õ¼‘q€Äüü¼1ÿ¼æ ç  æ ‘q ç ‘qʇþ ƒ½þ
‡d$„½î ,нüÞ½*k±™ ã½Á™\潑qƒßƒ¼¾,’¾è  è ‘q‘q ˜¾
ƒ‡d$™¾üÀ¾)k±™ žÁ™\Ⱦ‘qüŒ¿0k±™ ‘¿Á™\”¿£rˆŠÚÛàߊ57„ÿÉ¿Lð¿$õ¿‘qüŽÀ#T‘À£r
Їd˜,œÀÜëÀDîÀé  é £r ÷À
‡d$øÀü¬Á'kŽŽŸ™ ±Á¯™ ´ÁÝ™\·ÁÔl,.02üÚÁ0TèÁê  ê ÔlœåŒ óÁŒ
ü^_$ôÁü¥Å',ºÅë  ë Ôl ë ü^Œ ÀÅŒ
ü^‚_$ÁÅ,ôŃò›ò¸òü^‚_†ã˜~üƒÊ3L˜Êì  ì Ôl ì ü^Œ ¢ÊŒ
ü^‚_$§Ê,âʃò›ò¸òü^‚_è¨õü˜~üßÍ/<ôÍí  í ÔlŒ üÍŒ
ü^‚_$ÎüýÐ8L’Ñî  î ÔlšlŒ œÑŒ
ü^‚_$¡ÑüªÒ6D´Ò×ï  ï ÔlŒ ½ÒŒ
ü^_$ÂÒnew_refsÁDÈÒü³è'œ¶è×ð  ð ˜~ Ïè
expÁÊèÌŽéd”é×L,…С¢ Ôšb\*®¸œÕD7дÍLï+ŸãŸ\Y ãŸŠ T,oq^`üFQSœQCüh7lzÐk¢¢±™´ˆárì¬ÿϲᆥ£¤ ˆÎ_Œ¦¡¡œÕĽ¡¡Õ üÚ%k¦¦±™ ßÁ™ár§¨©܆Ðár¥¥
§‡dü£-Ðñ  ñ árÙÇ¥ ¹¥
¨‡düÄ7ò  ò ár§,˜~¥§,ªª Ì¥©â¬´¬´¬´ô´˜~
©‡d¬´new_headÁDÓbeforeÁ4
€o‰g„¿ÐØkÙÙØŸ™ ʯ™ ÍÄÊ÷sÛÜÞÜ÷÷sÚÚ
Û¼õÐû  û ÷sÚ ýÚ
Ü܃òÝ›òݸòÝÝÜݵá˜~üà#Ðü  ü ÷s˜~Ú ìÚ
Þ¦´Þƒòß›ò߸òßßÞßØäŽ˜üã*káá±™ èÁ™÷sâÂâü”5$—ý þ  ý ÷s þ Ù¶˜~àãã ŸàŠž œ
â‡dÏ`¦´Ë')üš1åkææåŸ™ Ÿ¯™ ¢Ý™\¿žÇçèéêìñ*,/1ŒÒÐääüü6ŠžÇää
èü^_è“/<üã-æÐÿ 
 ÿ žÇ 
÷sÙÇä êä
éü^‚_Û ,ñü' t“'Ð
 
žÇä ¢'ä
êü^_$£'Ê'êƒòë›òë¸òëëêëü^‚_ €Ê˜~ü‚(L( à žÇ··†-¹™-к® Ðà¥÷G”Æ™‚_1ø°ú°û°Ðü°ý°þ°ìHˈXêE>ø0äà íø0î1ïíïîä©âÞÖ ž(©â•ÖüÖ((•Ö à €oüÛ(#•ÖÎךÖLõ(
ìü^‚_à ÞÖ•Ö$®(™-$¼(þ Ó(š(|~4Ž*ìƒòð›òð¸òððìðü^‚_ÞÖ•ÖÕšÖ˜•Öü–+3L¤+
 
žÇ 
ü^‚_òä ®+ä
ñü^‚_$¯+€Ç¹+ññÄÈ©âüÙ&ÀüÙ‚_\¾+ÊÚ?ÙÚñüê+Bà ôõköôõöŠž ó+šž ö+Èž\›,åž©,ÐÐà.Óý.ÐÔèÐÕ“/ÐÖ¢/ÐðR  Èš_ÂÌÕ`÷úþÿï+ˆôü³,ª$Á,ƒ

 ƒ
ÕÛ··†-¹™-к® Ðà¥÷G”Æ™Õ`ññõó˜×ô® ×é„©sM!ÝÕ` 
ÄÂÌóÄøø Ò,ó©â–Þ Æ,À–ÞÕ`\Ñ-
÷à Ï`Õ`–Þ$Ó,™-$á,5ø,¶1Lš-JL4ç.÷ƒòù›òù¸òùù÷ùÏ`Õ`–Þ ø°ú°û°Ðü°ý°þ°ìHˈXêE>Ôe샚íƒlÕ°Ù[¢'õ
ñˉgÂ̘ ÒÝ  –Þüš0’4¨0

 
ÕÛ—ÝÒÝ 
–ÞóÄûû È0óÄÞ ¯0ÕÞ\²0
úà Ï`Õ`–Þ$É0™-$×05î0¶1L1?A4¬2úƒòü›òü¸òüüúüÏ`Õ`–Þ‹àžá4–3úƒòý›òý¸òýýúýÏ`Õ`–Þ Òàø°ú°û°Ðü°ý°þ°ìHˈXêE>ÍŽ˜üó5:Dö5РŪÅóó
þÃ Ï`Õ`Ë$ÿ5üÙ63$ç6
 
ÕÛø°ú°û°Ðü°ý°þ°ìHˈXêE>ŽÄó ì6ó
ÿà Ï`Õ`$í64±7ÿƒò›ò¸òÿÏ`Õ`‹àø°ú°û°Ðü°ý°þ°ìHˈXêE>Êä˜~4ç7ÿƒò›ò¸òÿÏ`Õ`Èäâʘ~üù8IƒkƒŸ™ þ8¯™ 9¿™,ž9Ι<¦9Ý™\¶9žÇ469;üÉ9L×9ˆ

 ˆ
žÇ 
÷sð2ø°ú°û°Ðü°ý°þ°ìHˈXêE>ø0ø0ð2 í9©âÃë á9©âúêü™:,Š
úê Š
€oüž:'Š
úê¯ìÿêL¼:
ü^‚_Ãëúê$î9Û ,ü9õ"$“:ƒ4Ô<ƒòˆ›òˆ¸òˆˆˆü^‚_ÃëúêÕÿê˜úê˜  ÷s”¨@D«@Ð
 
žÇ˜~ ´@
ü^‚_$µ@×BƒòŠ›òЏòŠŠŠü^‚_ €Ê˜~ßAßA­âAÎf«<ãA¾ «<µ[<™é€o‰güÃETÑEŒ

 Œ
žÇÚÕœå 
ûçÄŒŒ õEÎè ÜEé\ßE
ü^‚_ûç$öE™-$„F5F¶1L½F9;4ÙGƒò›ò¸òü^‚_ûçšÕ˜ œå  ûç4ÃHƒòŽ›òޏòŽŽŽü^‚_ûç ÄÊø°ú°û°Ðü°ý°þ°ìHˈXêE>¿—Ž˜üìI‘,úIŽ

 Ž
žÇÚÕœå 
ûçÄ ™JÎè €Jé\ƒJ
ü^‚_ûç$šJ™-$¨J5¿J¶1LáJ9;4ýKƒò›ò¸òü^‚_ûçšÕÎò4çLƒò›ò¸òü^‚_ûçÁóŽ˜ÌŠN÷s”á`üªN8­N


 
÷s 
Á`Á`œÃ`è Á]Ä`ÎfÁ]Ê­\É:•
ø¶ ±N
$²Nþ ¸N4üNƒò›ò¸ò¸áø¶  Á`Á`œÃ`è Á]Ä`ÎfÁ]Ê­\É:•ü¾P&k˜˜±™ ÃPŠž ÆP¸t™á`!üëP8îP


 
¸t 
Á`Á`œÃ`è Á]Ä`ÎfÁ]Ê­\É:•
ø¶ òP
‡dÏ`$óPþ ùPüS+k±™ ”SÁ™\—S±sœá`œüÁS8ÄS

˜
 
±s 
Á`Á`œÃ`è Á]Ä`ÎfÁ]Ê­\É:•˜
ø¶š ÈSš
œ‡d$ÉSþ ÏSüÒU*kžž±™ ×UÁ™\ÚU±sŸ ŸüƒV"†V
š
 
±s š
±s ‰V
Ÿ‡d$ŠVî ,VüÑV#k¡¡±™ ÖVÁ™\ÙV±süùV+k££±™ þVÁ™\W±s¤Ë¤ü«WA\®W
œ
 
±s œ
±s†‡¢ ºW¢
¤‡d$»Wî ,ÁWü£X$k¦¦±™ ¨XÁ™\«X±s§Ä§üÎX1ÑX
ž
 
±s ž
±sʇ¥ ÕX¥
§‡d$ÖXî ,ÜXü®Y&k©©±™ ³YÁ™\¶Y±sªßª¼ÛY,ÞYŸ
 Ÿ
±s±s¨ äY¨
ª‡d$åYüŒZ%k¬¬±™ ‘ZÁ™\”Z±süÈZE<ÖZ±sk®®±™ ÞZÁ™\áZ
­‡didxÁîZ!LÝG,áGÄÊ·¸ÀÁ¢$ Ô¯²T 㯳ã,5 ¢¯´¡$@ Яµá,Z ¯·\L çZ¯¹b\Š ®¸¯ºÕ д¯¼£=Ó ¢¯¾ÕG$Ü Ø¯¿Íð ï+¯Á÷ õ ê¯Âî ·1¯Ãû=­ Ñ´¯½ûÒ´¯½ü=¸¦Ó´¯½üÔ´¯½G=¿¬Õ´¯½GÖ´¯½F5¹²×´¯½FØ´¯½5§¶Ù´¯½Ú´¯½üß õ çêd. ÜËοÂ'°³£¦5 ´ Ž|´ê qtbeSVü¦ * ,¸ ÅkÆÆÅŸ™ ¾ ¯™ Á Ý™ ävpɵ ¾ï´ÇÈÉ0257¬ý ˆ ÄÄÌ™ ,™ ¯ÄÄÔe샚íƒlÕ°Ù[¢'õ
÷s‰gü‰! 4‰ ¯ÄÄÔe샚íƒlÕ°Ù[¢'õ
žÇ‰gü¯*  ËkÌËÌŸ™ Ç ¯™ Ê Ý™ µwÀ
™š1‡òšÍÎü1368Äà ¯ÊÊÔe샚íƒlÕ°Ù[¢'õ
âu‰g„þ þ ¯ÊÊœÕüí0 ÐkÑÐÑŸ™ ò ¯™ õ Ý™\‘ ävÒÖ"$üº  à äv¿7šÖÏà Óø0Ô¿7ÕÕÓÔÏ × Ö ©â®ü‹. ®Î×ü) ®ÎךÖ
Òü^‚_à ÞÖ® „ô þ ˆ Ò y{uwü•% £ ävÏÏ
Öü^‚_Ã6§ T“ Öƒò×›ò׸ò××Ö×ü^‚_ô´žÇ  ÖƒòØ›òظòØØÖØü^‚_ô´÷s˜~üé8 ÚkÛÛÚŸ™ î ¯™ ñ Ý™\• Äħ6ÇÃ6ÈÛ ¯ÉÖ6¯pɵ ¾ï´øe‚_ÜÝÞßàmortüÜ8 Tê  
  
î”øeÙ õ Ù
Üü^‚_ „ü ü¯9 \½ ¡
 ¡
î”øeÙ É Ù
Ýü^‚_ „Ð ü‰#5 d—# ¢
 ¢
î”Ù ¤# Ù
Þü^‚_$¥# „«# ü…&6 l“& £
 £
î”Ù ¡& Ù
ßü^_$¢& „¨& üœ)M $ª) ¤
 ¤
î”ÙiÙi¨.Üi÷ ®iÝiòÄ®iÞiˆÅ®it¸N(¤
ÐÐà.Óý.ÐÔèÐÕ“/ÐÖ¢/ÐðR  Èš_øe‚_Ù ¯) Ù
àü^_$°) ü*H âkãâ㟙 •* ¯™ ˜* ¿™,´* Ι<¼* Ý™\Ì* äväçèéêëì<>ACüß* Lí* ¥
 ¥
äv•9ÿêáø0å•9ææå ƒ+ áüë ÷* ©â¶œüœ+1 ¦
¶œ ¦
€oü¡+, ¦
¶œœÿêLÄ+
äü^‚_Ãë¶œ$„+ õ"$+ {}wyüî.9 „ü. §
 §
ävá / á
çü^‚_$Ž/ „”/ üò1: Œ€2 ¨
 ¨
ävá ’2 á
èü^‚_$“2 „™2 ü‘54 œŸ5 ©
 ©
äv˜~á ³5 á
éü^‚_$´5 „º5 üà8) \ã8 ¯ª
 ª
ävá ï8 á
êü^‚_$ð8 „ö8 üÏ;* dÒ; ¯«
 «
ävá ß; á
ëü^‚_$à; „æ; üï>) ,ò> ¯¬
 ¬
äv ¬
÷sá ø> á
ìü^_$ù> » ÿ> üŠA> îkïî A ¯™ žA  µT’A Ý™\¡A ävðá`ð*,/1üÏA8 ÒA ­
®
¯
 ­
äv ®
Á`Á`œÃ`è Á]Ä`ÎfÁ]Ê­\É:•¯
ø¶í ÖA í
ðü^‚_$×A þ ÝA üÍC0 òkóòóŸ™ ÒC ¯™ ÕC Ý™\ñC µwôõöø#%(*Ü„D D µwññ
ôü^_üƒG< G °
 °
µwø°ú°û°Ðü°ý°þ°ìHˈXêE> °
ävñ •G ñ
õü^‚_$G „œG ü¶H6 <ÄH ±
 ±
µw¢‹ ±
ävñ ÌH ñ
öü^_$ÍH £M öƒò÷›ò÷¸ò÷÷ö÷ü^‚_˜~ë°˜  µwüŽS6 DœS ²
 ²
µwÀÀÁÎNÅì¯ W§1coʲ
ü^‚_ñ ¥S ñ
øü^_$ªS üˆU, úkûúûŸ™ U ¯™ U Ý™\“U µwü ü"$')”»U $¾U ³
 ³
µw˜~ù ÃU ù
üü^_$ÈU üñ[> þkÿþÿŸ™ ö[ ¯™ …\  µTù[ Ý™\ˆ\ µw€á`*,/1ü¶\8 ¹\ ´
µ

 ´
µw µ
Á`Á`œÃ`è Á]Ä`ÎfÁ]Ê­\É:•
ø¶ý ½\ ý
ü^‚_$¾\ þ Ä\ üÂ`! kƒƒŸ™ Ç` ¯™ Ê` Ý™\Í` âu„ "%'Œø` $û` ¯âu
ü^_üÓa7 $Öa ¯·
 ·