Files
boc/aamos-ledger-rust/target/debug/deps/libtokio_util-3405af4dafe0ae10.rmeta
T

2301 lines
694 KiB
Plaintext
Raw Normal View History

rust
#rustc 1.96.0 (ac68faa20 2026-05-25)ÁÀ뉊]!ÜÛê(¹Þ—šên-5be7b69c3ff7b5b8ÁíàÄTËŸ ÜJîÄ)'ß\¥!-3d1337db07d0b3aeÁ¤²XctÔ'ÐÓ©z¨ɽÓ-a4945860e1c53b00Á¤°ð ¾ä-±($²ï=©Ã-7e98a21bfd32b0edÁòÖÀH•‘PIÓHã#£-055f30b747f859b6Árustc_std_workspace_coreÁ­Cçß^ò½èÝ$­Çÿ+Cé-c4878ee60b2242c9ÁŸÃï+Ñ]ŠqB<ÏïW#-8dd1dd90e70d0b6aÁ miniz_oxideÁ€š»J(P>àö÷g\K-1eb618da2918ab7fÁadler2ÁÆ;+Þ®5¥Ìýݰ¦ÛLˆ-f7919172d268e069Á hashbrownÁPäV9ÒÆèÜ"ÊÖVŽ\-0fc2184a5da6723aÁrustc_std_workspace_allocÁs&ØòØy¯s•bæ!‰ýŠ-97e4bf30be240674Á
std_detectÁhŠBîÙºÌI®ËÅš-9dbbf8346ba7ac8bÁrustc_demangleÁûë9´Ç×@Œ’ùXFº-f33013f239bf9f14Ácfg_ifÁÜLhž§Œaã¯>­-0a71c8f33a838301Á addr2lineÁ׎Þ!]8V$É@@-e618e6be60e87ba2ÁgimliÁ¸
°µ~Î1‹Ñt ðÁ€w-1f7768a68858f670ÁobjectÁ
áPÃ?­À¶¼QHJ¥-914cd6a4dbe590d1ÁmemchrÁ›º«8Ór­2Ù $¨ûib-cf21ca6f2bb15dcdÁë
‹ás«LÖ€îâƒ×ɯŒ-ee6f3747e38367f0Ápin_project_liteÁ·x¼+Ä`·á¨›t—¸Íœ-2dc344ecc91b59efÁ futures_sinkÁL1T𽉤
¾
Èþ.-14e3b8a05e30b9eeÁtokioÁ,¿¢¨˜É0!ñ?-…”¼9-3beca82a6f76b5d4ÁmioÁGùj0ðÔ·â"FÆ#0Q-3545320490828222Áæ\‹±ÔcdùÀTƒ-f86f80b348d33b13ÁbytesÁ`²['3_²µÆ=üå¥-d4f44708ed5da7b6Ásocket2ÁsT›¸n>~RÊ1G/R-c161f09f0083d1e0Á futures_coreÁÆöc$޳–º¾v¸dK-ac1e9cdb826f83c0Á KÊ ¤ ¥$&taskÁ$æ»rtÁtÍtestsÁ,ö¬ ,“/$ü.udpÁÊ»netÁxFãÔ Û»Ô compatÁ4ý»ö G˜read_arcÁDò»io-utilÁ˜Q¬read_exact_arcÁt˜»¨ &( sync_bridgeÁ\±»¨ FH SyncIoBridgeÁdÝ»¨ gicontextÁ<»» pRŠ timeÁ$…»¼
€S× è poll_proceedÁd€» Š Àâ cfg_codecÁ
cfg_compatÁcfg_netÁcfg_ioÁcfg_rtÁ
cfg_not_rtÁcfg_timeÁloomÁ ç    çcancellation_tokenÁ£disarmÁã guard_refÁ'aÁÍã tree_nodeÁ     TreeNodeÁ%innerÁ%wakerÁ (æ (notifiedÁ InnerÁ+parentÁ+
parent_idxÁ+childrenÁ+ is_cancelledÁ+ num_handlesÁ ² 
child_nodeÁ disconnect_childrenÁ with_locked_node_and_parentÁ44RetÁ4 move_children_to_parentÁ  remove_childÁ increase_handle_refcountÁ decrease_handle_refcountÁ;  cancelÁ CancellationTokenÁHÇL×NƒPãR>Tæ T child_tokenÁT³T²T cancelledÁTcancelled_ownedÁT
drop_guardÁTdrop_guard_refÁTrun_until_cancelledÁ]]] Trun_until_cancelled_ownedÁaaa eýe×hýh°hŠ  l×
næ n
new_futureÁ q°qŠ  týttæ 
xýxx°xŠ }}°}Š æ mpscÁ 
¥
into_innerÁœ¥œ×Ÿ¥make_acquire_futureÁ¡¥¡¡ ¤  InnerFutureÁ¦ý¦¥©¥©emptyÁ« ­¥­æ ­Š ­setÁ²¥²æ ²
take_stateÁ² poll_reserveÁ² send_itemÁ² is_closedÁ²get_refÁ²closeÁ²
abort_sendÁ¼¥¼ƒ¿¥¿ErrorÁ¿
poll_readyÁ¿
poll_flushÁ¿
start_sendÁ¿
poll_closeÁ 
 poll_semaphoreÁÉÉÉÉÉÉÉÉÉÉ É
É É É
É
PollSemaphoreÁØ semaphoreÁØ
permit_futÁÉÛæ ÛƒÛ clone_innerÁÛÇÛ poll_acquireÁÛpoll_acquire_manyÁÛavailable_permitsÁÛ add_permitsÁÉää poll_nextÁÉçƒÉé×ÉëÉ  reusable_boxÁîîîîîîîîîî î
î î îReusableBoxFutureÁüýü¥üboxedÁîý¥æ ƒŒtry_setÁ real_try_setÁý get_pinÁŠ î¥°Š î¥î¥×î
reuse_pin_boxÁ˜¥˜¦˜ ˜˜ î
CallOnDropÁž žž±î¢ ¢¢æ ¢Ñî§ §§ã
eitherÁ¬¬¬¬¬¬¬¬¬¬ ¬
¬ ¬ ¬
¬
delegate_callÁ¬¼¼£¼ ¼°¼Š ¬Â£ poll_readÁ¬ÆÆ£Æ
poll_fill_bufÁÆconsumeÁ¬ËË£Ë
start_seekÁË
poll_completeÁ¬ÐУÐ
poll_writeÁÐãÐ
poll_shutdownÁÐpoll_write_vectoredÁÐis_write_vectoredÁ¬ØØ£ØØÎ¬ÝÝ£ÝÝÄÝÄÝÑÝõÝãÝutilÁèéééééééé
MaybeDanglingÁð
ð¥ðˆéô¥ôãé÷¥÷æ éúú°úŠ ý èpoll_bufÁÿÿÿÿÿÿÿÿÿÿ ÿ
ÿ ÿ ÿ
ÿÿ
poll_read_bufÁ¥ÿpoll_write_bufÁ¥MAX_BUFSÁ èèèèfutureÁwith_cancellation_tokenÁœœœœœœœœœœ œ
œ¨ý¨¨æ « œ­ý­­°­Š œ²²æ ´ œ°Š  FutureExtÁ¿ª*¿with_cancellation_token_ownedÁÂ¥ cfg_io_utilÁtracingÁÅtraceÁcodecÁÇ bytes_codecÁÈÈÈÈÈÈÈÈÐæ ÈÒÒÄÒdecodeÁÈÖÄÖencodeÁÈÙÄÙŽ.ÇÇdecoderÁÝÝÝÝÝÝÝDecoderÁääÄäó-ä
decode_eofÁäframedÁé¥ÇÇencoderÁìììEncoderÁïïÄïŽ.ÇÇ framed_implÁôôôôôôôôôô ô
ô ô ô
ôôôôôINITIAL_CAPACITYÁô
WriteFrameÁˆbufferÁˆbackpressure_boundaryÁô>ô>ô÷ô÷ôborrowÁô
borrow_mutÁôõ1ôˆ2ô¥¦£Î       ô ¥¥¥š¥¦¥¨¥Ä¥Ñ¥õ¥ã­¥ÇÇÇÇÇÇœ/µµµµµµµµµµ µ
µ µ µ
µµµµµµµÊ¥Ê¦Êæ Ê
with_capacityÁÊ
from_partsÁÊôÊget_mutÁÊ get_pin_mutÁÊŽ-Ê codec_mutÁÊ map_codecÁÕÕÊ
codec_pin_mutÁÊ read_bufferÁÊread_buffer_mutÁÊ write_bufferÁÊwrite_buffer_mutÁÊ¡1Êset_backpressure_boundaryÁÊÇÊ
into_partsÁµá¥á¦ááÎµæ¥æšæ¦æÄæÑæõæãæµï¥ï¦ï×µó¥ó¦óæ öšÇÇ Ç
Ç framed_readÁûûûûûûûûûû û
û û û
ûû¥æ é4ô˜5§5Ƕ. decoder_mutÁ map_decoderÁdecoder_pin_mutÁ‰6œ67û¥Îû¢¥¢š¢¢Ä¢Ñ¢õ¢ã¢û«¥««×Ç Ç framed_writeÁ°°°°°°°°°° °
° ° °
°°°Á¥ÁÁæ Áé4ÁôÁ˜5Á§5ÁÇÁ·/Á encoder_mutÁÁ map_encoderÁÌÌÁencoder_pin_mutÁÁ³6ÁÇ6Á¡1Áç6Á7°Õ¥ÕšÕÕÄÕÑÕõÕãÕ°Þ¥ÞÞÞΰã¥ã¦ã×Ç Çlength_delimitedÁèèèèèèèèèè è
è è è
èèèèèèèèèLengthDelimitedCodecErrorÁÿ_privÁèæ builderÁmax_frame_lengthÁset_max_frame_lengthÁ decode_headÁ decode_dataÁ興Ĉó-èŒÄŒŽ.Ž è>èì@LengthFieldTypeÁèæ 
big_endianÁ
little_endianÁ
native_endianÁû@length_field_typeÁŸ¥length_field_lengthÁlength_field_offsetÁlength_adjustmentÁnum_skipÁ new_codecÁnew_readÁ¦¥ new_writeÁ¨¥
new_framedÁª¥num_head_bytesÁ get_num_skipÁadjust_max_frame_lenÁè¯>è±×è³×èÇ
ÇÇÇ lines_codecÁ¹¹¹¹¹¹¹¹¹¹ ¹
¹Åæ Ånew_with_max_lengthÁÅ
max_lengthÁ¹utf8ÁÉ ¹without_carriage_returnÁ¹ÌÌÄÌó-Ï ÌŠ/¹Ò¥ÒÄÒŽ.¹Ö>¹Ø×¹Ú÷¹ÇÇÇÇany_delimiter_codecÁàààààààààà à
à àDEFAULT_SEEK_DELIMITERSÁàDEFAULT_SEQUENCE_WRITERÁàïæ ïÔFïïFàóóÄóó-ö óŠ/àù¥ùÄùŽ.àý>àÿ×à÷àÇÇÇÈ
BytesCodecÁ
ˆÈÈÈŒƒÈŽ×ÈÖÈ È
È È ï
È
§šùÈœ>ô ReadFrameÁžeofÁž is_readableÁž“1ž has_erroredÁô
£×ôRWFramesÁ¥readÁ¥writeÁô ¨>µ FramedPartsÁª¥ª¦ªioÁªŽ-ªread_bufÁª write_bufÁªÒ@µ²¥²¦²×èBuilderÁ
max_frame_lenÁlength_field_lenÁÝCøCDlength_field_is_big_endianÁè ½×è
è Àƒè èLengthDelimitedCodecÁÃì@úè
Æ×èȃè DecodeStateÁÊHeadÁË
ÊDataÁÍ
͈èÐ×èèÓƒè¹
LinesCodecÁÖ
next_indexÁÖïFÖ
is_discardingÁ¹Úƒ¹Ü×¹ ÞÖ¹
¹ á¹ ã¹
åï
¹ç§èù¹LinesCodecErrorÁêMaxLineLengthExceededÁë
êIoÁí
툹ð×àAnyDelimiterCodecÁòÜPòïFòöPòseek_delimitersÁòsequence_writerÁàøƒàú×à üÖà
à ÿà à
ĕ
à§ùàAnyDelimiterCodecErrorÁˆMaxChunkLengthExceededÁ
ˆ¬R
ˆàŽ×±M
copy_to_bytesÁš¤šæ šôš˜5šÇ ý ¤ Ä Ñ õ ã ¨¤¨¨ÎinspectÁ¬¬¬¬¬¬¬¬¬¬ ¬
¬ ¬ ¬º£ººæ ºÇ¬¿£¿¿³$¬Ã£ÃÃÎ%ÃãÃè%Ãý%Ø&¬Ë¨ËËæ ËǬШÐÐÎ%ÐãÐè%Ðý%И&¬Ø¨ØØ³$ÃMÜÜÜÜÜÜÜÜÜÃMå£ååå é ReadBufFnÁê
êýê£êêˆêéñýñ£ññ°ñŠ 
reader_streamÁ÷÷÷÷÷÷÷÷÷÷ ÷DEFAULT_CAPACITYÁ÷ƒ £ƒ æ ƒ é4÷£ÎŠ simplexÁŒ Œ Œ Œ Œ Œ Œ Œ Œ Œ  Œ 
Œ  Œ  Œ 
Œ Œ Œ Œ Œ Œ IoResultÁ  ¥Œ CLOSED_ERROR_MSGÁŒ £ é4£ register_receiver_wakerÁ£ register_sender_wakerÁ£ take_receiver_wakerÁ£ take_sender_wakerÁ£ 㣠close_receiverÁ£  close_senderÁŒ ¬ ㌠® ³$Œ ° ㌠² Î%² ã² è%² ˜&² ý%Œ æ  sink_writerÁ¹ ¹ ¹ ¹ ¹ ¹ ¹ ¹ ¹ ¹  ¹ 
¹  ¹ Æ ¤Æ æ Æ ôÆ ˜5Æ Ç¹ Ì ¤Ì Ì ýÌ Î%Ì ãÌ è%¹ Ó ¤Ó Ó Î¹ × ¤× ³$
stream_readerÁÚ Ú Ú Ú Ú Ú Ú Ú Ú Ú  Ú 
Ú  Ú ç ¤ç ç ç æ ç  has_chunkÁç into_inner_with_chunkÁÚ î ¤î î ôî ˜5î §5î ÇÚ õ ¤õ õ õ ³$Ú ú ¤ú ú ú Ù$ú î$Ú 
¤
Ú StreamReaderProjectÁƒ
ýƒ
¤ƒ
ƒ
ǃ
chunkÁÚ 
¤

projectÁÚ 
¤


¥
Ä
Ñ
õ
ã
 
Œ ù¢
¡1¢
ã¢
receiver_wakerÁ¢
 sender_wakerÁ¢
bufÁŒ ¨
׌ ReceiverÁª
ÇŒ ¬
׌ SenderÁ®
ÇŒ °
×Ú  StreamReaderÁ²
¤²
²
Dz
õcÚ ·
¤·
·
× DropGuardÁ»
ǽ
× DropGuardRefÁ¿
ý¿
ÇÂ
ýÂ
×WaitForCancellationFutureÁÅ
ýÅ
¥Å
œ*É
Ê
ýÉ
__assert_not_repr_packedÁÌ
ýÉ

ProjectionÁÎ
'__pinÁÎ
ýÎ
¥Î
œ*É

ProjectionRefÁÓ
ýhÓ
ýÓ
¥Ó
œ*Ê
—dØ
ýhÊ
 project_refÁÚ
ýhÉ
__OriginÁÜ
ýhÜ
ýÜ
__dummy_lifetimeÁÜ
¥Ü
œ*É
â
ýhâ
ýÉ
MustNotImplDropÁÉ
æ
¥É
è
ýWaitForCancellationFutureOwnedÁê
œ*ê
¥í
í
Ãhí
ëhð
ýhð
œ*ð
¥í
£iô
ýhô
œ*ô
¥î
—dø
ýhî
èiú
ýhí
ƒjü
ýhü
£jü
œ*ü
¥í
 ýhí
àjí
 ¥í
RunUntilCancelledFutureÁ ý   cancellationÁ œ*Œ  ý Œ Ãh ý Œ ëh ýh ý  ¶m œ*Œ £i ýh ý  ¶m œ* —dŸ ýh èi¡ ýhŒ ƒj£ ýh£ ý£ £ £j£ ¶m£ œ*Œ ª ýhª ýª Œ àjŒ ¯ ¥Œ ± ý± RunUntilCancelledFutureOwnedÁ´ ´ ¶m´ œ*¸ ¹ ¸ Ãh» ¸ ëh½ ýh½ ½ ¶m½ œ*¸ £i ýh  ¶m œ*¹ —dÇ ýh¹ èiÉ ýh¸ ƒjË ýhË Ë £jË ¶mË œ*¸ Ñ ýhÑ ¸ àj¸ Õ ¥¸ × 
PollSendErrorÁÙ
Ù ¥Ù ˆÝ ¥Ý ×StateÁà ¥à IdleÁâ
â ˆà  AcquiringÁå
à  ReadyToSendÁç
ç ˆà ClosedÁê
 ì ¥ì ×
PollSenderÁï ¥ï senderÁï ºï acquireÁ
ô ¥ô ×PollSenderFutureÁ÷
÷ ¥÷ ˆ û ¥û ׬EitherÁþ þ £þ LeftÁ
 ˆþ RightÁ
 ˆ¬  £ ׬  £ ƒèèèèRestoreOnPendingÁ
è 
made_progress珯
œWithCancellationTokenFutureÁ ý  ±œ œ ýœ  ÃhŸ ýŸ  ëh¢ ýh¢ ý¢ ¢ ± £i§ ýh§ ý§ § ±œ —d¬ ýhœ èi® ýh ƒj° ýh° ý° ° £j° ±  ýh ý  àj » ¥ ½ ý½ œ WithCancellationTokenFutureOwnedÁÀ À ±œà Ä à ÃhÆ à ëhÈ ýhÈ È ±à £iÌ ýhÌ Ì ±Ä —dÐ ýhÄ èiÒ ýhà ƒjÔ ýhÔ Ô £jÔ ±à Ù ýhÙ à àjà Ý ¥à ß ¹ 
SinkWriterÁá ¤á ǹ ä ¤ä ×¹ ç è ¤ç Ãhê ¤ç ëhì ýhì ¤ì Çç £ið ýhð ¤ð Çè —dô ýhè èiö ýhç ƒjø ýhø ¤ø £jø Çç ý ýhý ¤ç àjç 
¥ç ƒ
¤÷ ReaderStreamÁ
£
readerÁ
ìe
capacityÁ÷Š
£Š
×÷
Ž
£
Ãh
£
ëh
ýh
£
š~
ìe
°~
£i˜
ýh˜
£˜
š~˜
ìe˜
°~Ž
—dž
ýhŽ
èi 
ýh
ƒj¢
ýh¢
£¢
£j¢
š~¢
ìe¢
°~
©
ýh©
£
àj
­
¥
¯
£¬
InspectWriterÁ±
¨±
±
writerÁ±
±¬
·
¨·

Ãhº
¨º

ëh½
ýh½
¨½
½
½
±
£iÃ
ýhÃ
¨Ã
Ã
Ã
±·
—dÉ
ýh·
èiË
ýh
ƒjÍ
ýhÍ
¨Í
Í
£jÍ
Í
±
Ô
ýhÔ
¨Ô

àj
Ù
¥
Û
¨Û
¬
InspectReaderÁÞ
£Þ
Þ
š~Þ
±¬ã
ä
£ä
ã
Ãhç
£ç
ã
ëhê
ýhê
£ê
ê
š~ê
±ã
£ið
ýhð
£ð
ð
š~ð
±ä
—dö
ýhä
èiø
ýhã
ƒjú
ýhú
£ú
ú
£jú
š~ú
±ã
ýh£ã
àjã
¥ã
ˆ£ˆ CopyToBytesÁ¤ÇޤŽ×¤Ãh¤ëhýh¤Ç£išýhš¤šÇ—džýhèi ýhƒj¢ýh¢¤¢£j¢Ç§ýh§¤àj«¥­¤° FramedWriteÁ¯¥¯¯Ç°³´¥´³Ãh·¥·³ëhºýhº¥ººÇ³£i¿ýh¿¥¿¿Ç´—dÄýh´èiÆýh³ƒjÈýhÈ¥ÈÈ£jÈdzÎýhΥγàj³Ó¥³Õ¥Õû
FramedReadÁØ¥ØØÇûÜÝ¥ÝÜÃhà¥àÜëhãýhã¥ããÇÜ£ièýhè¥èèÇÝ—díýhÝèiïýh܃jñýhñ¥ññ£jñÇÜ÷ýh÷¥÷ÜàjÜü¥Üþ¥þµFramedÁ¥¦Çµ¥¦Ãh¥¦ëhŒýhŒ¥Œ¦ŒÇ£iýh¥¦Ç—dýhèi˜ýhƒjšýhš¥š¦š£jšÇ ýh ¥ ¦àj¥¥§¥§¦ô
FramedImplÁª¥ª¦ªørªÇªºªŽ-ô ±¥±¦±ør±×ô·¥·¦·ørÃh»¥»¦»ørëh¿ýh¿¥¿¦¿ør¿Ç¿º¿Ž-£iÇýhÇ¥Ç¦ÇørÇÇǺǎ-·—dÏýh·èiÑýhƒjÓýhÓ¥Ó¦ÓørÓ£jÓÇÓºÓŽ-Üýhܥܦܸràjâ¥ä¥ä¦äør


*
1
2
3
4
4
4
8
8
9
9
:
;
=
M
M
M
O
Q
V
W
X
Y
\
]
g
g
g
k
k
k
m
m
m
p
s
s
s
|
|
|



ž
ž
ž
°
°
°
±
µ



·
¸
¹
º
»
¾
Â
Â
Â
Ã
Ã
Ã
Ä
Å
Å
Å
Ý
Þ
à
à
à
á
á
á
â
ã
æ
æ
æ
è
ê
ê
ê
ì




Ž
Ž
Ž









ª
Á
Á
Á
Å
Å
Å
Å
Å
É
É
É
Ê
Î
Ï
Ï
Ï
Ó
Ó
Ó
Ó
Ô
Ô
Ô
Õ
Õ
Õ
Ö
Ö
Ö
Ö
Ö
×
Ü
Ü
Ü
ã
ã
ã
ä
å
å
å
æ
æ
æ
ö
ý
ý
ý








±
±
±
¹
¹
¹
À
Õ
Õ
Ø
Ø
Û
Û
ç
ç
è
è
ò
ò


˜
š
 
 
 
«
«
«
¬
­
­
­
¯
¯
¯
Ð
Ñ
Ò
Ó
Ô
Ø
Ù
Ú
Û
Ü
Ý
Þ
å
å
å
ë
ë
ë
ì
í
í
í
î
î
î
ò
ò
ò






š

¡
¡
¡
§
§
§
¨
©
©
©
ª
ª
ª
®
®
®
Æ
Ç
È
Ê
Ë
Ï
Ð
Ñ
Ò
Ó
Ú
Ú
Ú
Û
Ü
Ü
Ü
Ý
Ý
Ý
â
â
â
æ
æ
æ








Ž
Ž

œ

ž
Ÿ
¡
¢
£
¤
¥
¦
¨
ª
¬
­
®
²
²
²
´
´
´
È
É
Ë
Ï
Ï
Ñ
Ñ
Õ
Õ
Ù
Ù
Ù
ò
ö
ö
ø
ø
ü
ü












˜
˜
š
š
¤
¤
¤
µ
µ
µ
¾
¾
¾
Á
Ç
Ç
Ç
É
Ñ
Ñ
Ñ
Ô
Û
Ý
Ý
Ý
ß
â
â
ä
ä
æ
æ
è
è
ñ
ñ
ñ
ù
û
û
û
ý












ž
¤
¤
¤
¥
¦
¦
¦
§
§
§
«
«
«
½
¿
Â
Â
Â
Â
Â
Æ
Æ
Æ
Æ
Ç
Ç
Ç
È
È
È
É
É
É
É
É
Ê
Î
Ð
Ó
Ó
Ó
Ó
Ô
Ô
Ô
Õ
Õ
Õ
Ö
Ö
Ö
Ö
Ö
×
Û
Û
Û
Û
Û
å
å
ö
ö
ö
Š
Š
Š
¥
¥
¦
¦
§
¨
©
ª
«
­
¯
¯
¯
¯
¯
±
³
³
³
³
´
´
´
µ
µ
µ

·
·
·
·
·
É
Ê
Ð
Ð
Ð
Ð
Ñ
Ñ
Ñ
Ò
Ò
Ò
Ö
Ö
Ö
Ù
Ù
Ù
Ù
Ù
ì
ñ
ò
ó
ù
ù
ù
ù
ù
þ
þ
þ
ÿ
Œ










©
©
©
­
­
­
±
±
±
º
º
º
¾
¾
¾
Ä
Ä
Ä
Ì
ï

»
ß
ß
ß
î
î
î
ö
ö
ö
ý
ý
ý
Š
Š
Š
Ž



Ÿ
Æ
æ
æ
æ
ê
Œ
Œ
Œ

º
ç




·
à

µ
µ
µ
»
è8è8_8äïá¤ûÒªØ
¬
å
ƒ ® Ô º Ü ¿Š ˆåJˆÈ ÌöF>ý pÛö¬Øö¬¿cö¬ö¬Ðìö¬µßö¬ö¬ºö¬íßö¬ö¬šeö¬³ö¬äö¬ïö¬ÂÂBytesÁõ £Ä£ÅdataÁ£ÆvtableÁ£NÍâíŠáïö¬¿¿BytesMutÁÀµ ÁÂcapÁÃç­)Ö1^ÔvÏ¿cªª¨®Ç¯º°Ž-%ƒ_úæ÷í¥¦ør“íªª¨®Ç¯º°Ž-%ƒ_úæ÷í¥¦ørá̰ሰ¿cžž‚LŸ“L žL¡“1¢¹Lû$瀩!/é³¥¥ÙL¦éL§õL¡FÃù^¿âa³Ù±³ˆˆ1“1Š¡1Í<k±¦ÉéÙ±£¯éø²£¯ ®²Ù±£®²Ù± ®²ø²£®²ø²Eªª¨®Ç¯º°Ž-%ƒ_úæ÷ḭ́Ò°£
ªª¨®Ç¯º°Ž-%ƒ_úæ÷ḭ́°±¨š“íçǵ
@nð›î?ª±°±¤̰¤çǵ
@nð›î?̰Ò°E‘¶
çǵ
@nð›î?̰°±ºµ¿c‘¶¿cªªŽM­±M®Ž-¯ÃM°ÓM±Ò@<za˜›5&L̰Ò°“íØØ¢‹ÛÇûõ]´']X#ª±ṵ̂ûØØ¢‹ÛÇûõ]´']X#̰EѸ
ØØ¢‹ÛÇûõ]´']X#›̰¹¸ºµ¿cѸ“í¯¯܈²Ç°@@r·%ª±Ò̰Ò¯¯܈²Ç°@@r·%̰
¯¯܈²Ç°@@r·%̰›ººµE¯¯܈²Ç°@@r·%̰„¹¿c¯¯܈²Ç°@@r·%̰Ò°¿c‰N·˜N踭Nè¹ÝCèºøC軑Dè¼ÝNèŒãŸuZÛ¯¼Ø¯¼Š ¯¼¿cÃãOÄì@èźè¸Ê]OÊjøØÁ½¿cÊËÌüOÍÎPψè
½„üH;Ù6Û¾Ø¾Š ¾äÁ½ïÁ½·®³Á½³¯¼¿cÿÿ±@Ò@è )Ö/ 7ÄcÙ¿¾Ù¿ØÖÖÊP×ÜP¹ØïF¹ÙöP¹þ–T˜÷Yw¿c¤À¤ÀÐì¤Àµß¤À¤Àº¤ÀíߤÀ¤Àše¤Àä¤Àï¤À̰³¤À¿cêëìŠRíî¬RÙ3OÞ#]&ÄcîÁéîÁßßÄà ¬
ÑøÿËO Ÿ¾îÁØòòÐRóÜPàôïFàõöPàöSà÷˜Sàå&ƒæ"ï9=¿cƒÃƒÃÐìƒÃµßƒÃƒÃºƒÃí߃ÃÚeƒÃäƒÃïƒÃ̰³ƒÃ¿cˆŠµTŒ¬Rˆ© o$wbQÄcåÄéåÄþåÄ¿cÁ†Çùr íÈBF¯¤“íÁ†Çùr íÈBF¯¤ª̰ªÐÅ
Æ ý
EÐÅ“íÞ
Þ
Ùƒá
š~¬â
±¬]3Ê
£̰Þ
Þ
Ùƒá
š~¬â
±¬]3Ê
£|ØÇ¯ØÇ“í±
±
耴
µ
±¬ËÜ{†9s6¨ÀÇØ
̰Ø
±
±
耴
µ
±¬ËÜ{†9s6¨™È¯”É|”É‚ØêêëåYïˆÜðÜ ›Á#@‰Ë†ýºÇ¿c

þ}
š~÷ˆ
ìe÷
°~÷ø`!þ ËŸ5“È“í

þ}
š~÷ˆ
ìe÷
°~÷ø`!þ ËŸ5ºÇ¬
̰¬
ÌÊEÌÊ¿c¢
¢
ù£
¡1Œ ¤
㌠¥
ÂeŒ ¦
ØeŒ §
ìeŒ *¾Ý`¿cª
ª
„f«
ÇŒ ±ÙÃ2øŒ"ôÌ|ôÌ¿c®
®
©f¯
ÇŒ 6†è¬>:~Œ"¾Í¯¾Í¿cá á ä{ã ǹ Á
FÿÅ“íá á ä{ã ǹ Á
F¼Æ
̰
‰Î¯‰ÎE‰Î|‰Î¿c²
²
Ìfµ
ÇÚ 
õcÚ 42,kŠðÿÅ|±Ï`±Ï“í±Ï
±Ï¥¿c»
»
œg¼
ÇE¥Ëf´mŒ"¬Ð¿c¿
¿
ÀgÁ
Çl£¹Ð„‘¼ýŒ"¿
¿
ÀgÁ
Çl£¹Ð„‘¼8«½HHèIÇ,|ðÌ_çu¬½ßÑ“íÅ
Å
÷gÇ
¥È
œ*åí­äýøsLýå
̰å
Å
Å
÷gÇ
¥È
œ*åí­äýøsLý“íê
ê
kë
œ*ì
¥uµËc¹W¶ƒ ̰ƒ ³Ó¿cßÑØßÑŒ"ßѳßÑ¿cíÒ‚ØíÒ¿c³Ó‚Ø³Ó“í  ‡mŠ ¶m œ*ËÈ#j}´€ýÀÇ® ̰®   ‡mŠ ¶m œ*ËÈ#j}´€ý™È‚Ø·Õ“í´ ´ ƒp ¶m· œ*ýŒ¢©Û‹†™ÈÔ ̰Ô ´ ´ ƒp ¶m· œ*ýŒ¢©Û‹†‚ØÛÖ¿cÙ Ù Ú ¹rÜ ˆ ùį¦ib\̰Äc¬×¾¬×¿cà â ã sä ˆå æ ¦sç è ¼sé ˆê ë ÜsÖD0Ÿƒœ{ḭ̈¿cï ï „tñ žtò ºó ´tˆõæ±ÛÕT̰¿c÷ ÷ ø Øtú ˆ ½„íBR\²̰ØøØ
øØ̰EØØÙÉÚ¦Éó¹ßjć'ØžÚ¿cžÚàžÚìOìO SemaphoreÁíOll_semÁGÈèGEä b>‚ØüüÞÿîîÎRŒ\7ø8ª± ¾Û¿c¾ÛŒ"žž™"¡±îM&iñ.iãÏ ™È¿cþ   ¸uƒ ˆ  Ñu ˆ¤-íÂâªEºÇØÑÜ‚ØÑÜ|ÑÜ`ÑÜÑܯÑÜEÑÜ
ÑÜŒ"ððñØ'óˆé Åxk„\̰‚ØððñØ'óˆé Åxk„\“×“í  óvš ±œÇЉª@ÅÉtýÀǺ ̰º   óvš ±œÇЉª@ÅÉtý™È‚ØËß“íÀ À Éy ±œ€În‡`—m™ÈÜ ̰Ü À À Éy ±œ€În‡`—m“ׂØÛà¿̰ŠÂÕÊ¿ÒÊŒÀÈÃÓÊÚÖøòNï çØ þ ޱª£žï²ª«Øã¯½ÆÃÐʱÿÜÖðêúòŽˆŽŠ

¨
¢
¬
ª
°
®
ä á ·
²
½
»
Â
¿
LHeÅ
lê
Ý Ù ì à ô ï û ÷ éØü þ ÞÖüòàÖþòáÖÿòãÖòåÖƒòçÖòœ¨¥žˆÃ¯ÖÖýòRˆÃÌÖóòÖÙŒÃÒÖùòܪ ÷ØÎ¯§Þ
Ô
±
©

ý á
²
â
Å
ê
ª  Ñ ´  Ù À â䪞ˆÚꈥ¥¥¥ªáØÞ¯¨
Ó á 䨨þ ¥ªæ¢ØÕ¯ 
²
¿ï Ýþ ¥§üþØÓÕ¯˜³ÿØêÿˆœÙ µÿÜꃈŸÙ «­ˆÞ
¿Þ
ر
® ª
× á õ ²
Âþ ÃÞ
б
² ®
Ì á Ðþ Ù
Û
±
ñêhÅ
qê
x }´ ü¼þ úð­ À ­
¯

¬ ª
° ®
»
¿
Pžôð
ƒ
á ú ²
Æþ JHK
è
Å
ê
¯ ±  Õ × ´ ëØüËþ » ½  Ý ß À Š Ä
ÛØ
¿c"DêÐìµßºíßše³ ä=ï“í#ápé
 £E 
?¤8û
Ò

Äc¾ª
|
¯*Ø
#‚Ø
¬
BŒ"
-`
«½¬½å
ƒ 
® 
Ô 
à
 º Ü 
¿
 ±5 86jü‘)£/ 5B èÆ Âü“1í–ðèïèï6 b",;\n\r"Á 5B–ð ïüÅ,î–ð ñŠ ñ6b","Á
ü« Ï  é“ÈïϓؓؔØÎ•؈ä o
³΢½Ö¿Ù¿Ú¿«Û¿ˆÜ¿Ý¿Þ¿ˆ‚†f|Â
à“È ïÏÁÎ
Ì €ôŠÚ †ô¤¸  ê“ÈïÏÍ  
ˆØêêëåYïˆÜðÜ ›Á#@‰Ë†“ÈïÏ iи “õŽ “õ¦«
öX “õ À ÉÍ
Úß
„Ø“õò
Š   * œØ©óAMç È©óú œØ©ó &ÇÓÚ
µ
Ãþ    é:øŽ« Ï  !(
f t  ΄ 
A Ò Žù 
ÍÖß=òú&0
®ßòC &-!k ßòv ÌÌkÎÓ¸Ï local_wakerÁ¸ÐextÁ¸Ñ_markerÁ¸Ò_marker2Á¸f'EwÚ]¾å€ô †ôÚ á“õù“õ'€ô†ôÈ “õ²X/œØžØŸØÈ Øˆ¡Ø¢Ø´‰‰Nµý¤Ã©ó}„¾„¾PinÁ†¾ ˜X$]È=„kt•´öº´öôöÌÈûhÈûqÈûçï©óÈûÄÌÔÜäì©ózþéLŠ€ôìe†ôéL®ìe°û7“õ Ló œØ(3
éB%,œØžØŸØÈ Øˆ¡Ø¢Ø´‰‰Nµý¤Ã¯ßò¸ÈûÁÉ“õ;û« TXƲý„¾„¾Œý†¾ ˜X$]È=„kt•ÝòCÈûL€ôF†ôE“õ6“õd²ýH€þQ´öZÈûck©óÈû}Ýò¿þÊéLÇ€ôìeφôéLëìeíût“õ  0 Œõ
®öâöéLìe“õ¾ûƒÖÚH“õèû­r4096Á "simplex has been closed"Áü—Kè
 `“×ðòÛ¼ݼÞ¼©ß¼à¼ÛἈcSñŸ«‡zÙ“×ƒØ ßѓ׃
,ÒJ
ÒJ
ׇ©ÙJ
“ל¤K
d©K

X$¤K
t©K
)$ÆK
 Û¼ɇü¡KØ

„ L
L¥L

Y$ L
\¥L
ÊL
 üèKt
  “× êL
 
ˆØ  ‡mŠ ¶m œ*ËÈ#j}´€“×x_ø¬èK‡
ÅŠ ÅŠž£
öX ÅŠ ¸ ÁÅ
Ò×
„ØÅŠ ê
Œ
 øü

¨
" œØ„‡9Eé
È„‡ÿ«îL
ÅŠ
­þL
(ÿL
œØ„‡&}ÅŠy޼Ì7r[ av |`ø­—Kè
 ÝäÂ#Ð#¡¨­ »ÅŠÓ  øL
 ÕÝíøÿ ox? l sy?
GWbir
| ÷
“×)07>ELU_
®ñ†rÜãµ¼$š ñ†¥Èû®ׇ“×ÙJ
Äׇ·ÅŠ ÅŠ4Å
Å
÷gÇ
¥È
œ*åí­äýøsLÀׇ³“׫Ŋ E|œØžØŸØÈ Øˆ¡Ø¢Ø´‰‰Nµý¤Ã„‡Ê„¾„¾Œý†¾ ˜X$]È=„kt•Þ‹Þ‹Þ‹Èû½ÈûÆÈû2:„‡àçÈûS[Öû #„‡ltþ$ÓJ
ׇfutÁà“×
ú–þûÅŠ «èù œØ ( 
`6  §y´_ ñ†h Èûq y ÅŠU2û—K
Þ±•Á „¾„¾Œý†¾ ˜X$]È=„kt•ï†ü Èû
ׇj “×W ÅŠVŊǔד׹±•zÿ•ƒÞ‹ŒÈû„‡CÈû¯„‡


þ¥
&ׇú–“×0
ú–!û¹ÅŠ Î  ñˆ
ω» ¾ŠS Ø‹Z ŒŒa ÅŠùÅŠ“×ê“×ñú–ÅŠ- ûÐçë­ ÅŠW ûú× ü•S3
 d“×ðò„‡ßÑ“×2? ¯ÑR
ßÑßѰ×R
“×$ŸS
ßÑìŸS
œ¤S

]“×3¸S

ĤS
½S
 
ˆØñ†N
%ø³ŸS#
ñ†DK ñ†ch
öXï† z ƒ

„Øñ†¬
ˆ º¾ Ê  㠜؄‡ùâ È„‡²ÁS
ñ†

´ÇS
ßÑ ÈS
œØ„‡ &fñ†
bßÑŠ
Ø
æÁ ÇÜ âdüø´•S3
 BI'5RYÄlñ†   ÇS
 ˆßÑ © ±ÌÕè d
kâ êóßÑ   '
1;E`is}“ד׫ßÑÀÇÎÕÞè
®¢žûÿ>E # ¢ž.Èû7ßÑ$ÑR
“××R
ñ†ƒñ†¾ׇà“×±ñ†~·±•À¥šÉï†Òï†ÛÈû»ÈûÄÈûöþ„‡ÞåÈû $,„‡)1þ<ßÑú–“×+ßÑú–7ûñ† ¨«¼Ê œØàë
dùý<C´"¢ž+Èû4<ßÑ ñ†Zû•S
BF¥±•ˆ„¾„¾Œý†¾ ˜X$]È=„kt• žÃÈûÌ“×ñ†
ñ†Hׇj±•(¥š1ï†:ÈûCK„‡+Èû]6 ž?þJßÑú–“×9ßÑú–Eû¡ñ†  ¹¾Ÿ%ðŸúÏ €¡ñ†ìßÑÖñ†úßÑäú–ßÑÈ“×_ûÄ hßÑž°Uûû<@Ÿüö ê  ¤̰ðòÖ¿Ù¿Ú¿«Û¿ˆÜ¿Ý¿Þ¿ˆ‚†f|Â
Ö>Ö> OwnedPermitÁØ>chanÁ¹>óëtÏ<
̰¬×Û¼ݼÞ¼©ß¼à¼ÛἈcSñŸ«‡zÙÇ>Ç>©fÉ>²±¹> B“dḭ́4B ¸¯ Û²Û²$‚
Û² ùØž"#ù½ž"#
°cùÓµ.#Zœ†94
Û²Û ³ü¡
# 

?̰

Ò
 
ˆØ”?̰ðòÖ¿Ù¿Ú¿«Û¿ˆÜ¿Ý¿Þ¿ˆ‚†f|Â
”²óMóMôM SendErrorÁöMˆ ]SqÍOKx ³îÈø»¡
6 íµçî íµ 
öX íµ ",1
?E
„ØíµY
 hm z 
 œØƱ¢®é ȺÖ
íµ ¼í
 ¥̰Ó¶¬×ü¡
d 

ç[”²Ó¶¬×¥̰Ö¹ ü¡
6 k
üå
à œØƱ&ù×@#á×#
ÜW>'ñíµ
 
ô
D J_ e¤ø¾ö ê ü‘
t cj¯,½,ÉÐÛ"ãíµ û  
 ¾ß   $[df ks
z ipx 
¤
«'Û²À'ÐÙâ ë ò*Û²*PYcmÛ²ž§±
®²±ÄD? §-ì ²±÷ÈûÛ² d‘
 ³6¢íµöíµ. ³íµEQ!œØžØŸØÈ Øˆ¡Ø¢Ø´‰‰Nµý¤Ão„¾„¾Œý†¾ ˜X$]È=„kt•ð·ªð·³ð·¼ÈûùÈûÈû×ß#ÈûøŒº!ù×Üì#ŒäÈäÈ ArgumentsÁæÈtemplateÁ `çÈÀ `üöMõô]Tdµ½ÅÍÕݼÄÌÔÜäìƱ#
+
þ6
ç­:Û²ç­MÛ²žtûsíµ ˆ
¦
´
œØÊ
Õ

¤ä
d_ÀÇ´
²± Èû ' Û².íµ;ç­ûö ÀÄ+ œØžØŸØÈ Øˆ¡Ø¢Ø´‰‰Nµý¤ÃƱº „¾„¾Œý†¾ ˜X$]È=„kt•°±õ Èûþ ô ³)
íµà íµ
þÁò ÌÂû ð·
Èû

R Èû'
ŒºH¦úÃÏ
Ʊ  °± þ 筡۲筴۲žtì
ûÚ íµ ï  ü  à´^ ¸µ æµÝ
ê·ä
£¸ë
íµ% ú¹æþºoíµ: ç­Û²G̰“?[
ç­û ßãJ Û²õË
ç­ûY  ƒ IJ  ¬̰ðòƱ,9ùݽD#Áݽ#
àWùÝÖ*#(œ†4ƒŽ ¯¬½ÈÕåíöÿ
®öÌ öÌ(Èû1íƱ@HþS\m{ œØœ
¬«´¸öÌÁÈûÊÒ² Ê ‘Èþ„¾„¾Œý†¾ ˜X$]È=„kt•ôÌ9ÈûBþQôÌZþenÆÍ.¤¢¥¸¹@64Á@MAX_BUFSÁ¬÷ ˆ%ö¬18?$û~
ÊÎ%¾18?û; êî%îÁ1ÃÂ9@½F ˆŒ%åÄ1ÃÂ9@ÔÙ êºÇ¿Ê%ë2êêëåYïˆÜðÜ ›Á#@‰Ë†ºÇ¿Ê ºÇ ¿Ê˜ŸÜ— Ù ̰Ú )¬×5Û¼ݼÞ¼©ß¼à¼ÛἈcSñŸ«‡zṴ̀ à ̰ã )ÿ×5 ³=D à ̰è )ÿ×5”²=DÔº ÷ ̰ø )ÉÙ5üüÞÿîîÎRŒ\7øƱmt$¿ þ ™ÝºÇ  -ÑÜ9™ÝAH þ ™ÝºÇ  -ÑÜ9ºÇAHüº " ð̰ñ*…Þ6ÑÛÑÛ MaybeUninitÁÓÛuninitÁÝÔÛ»ÝÍõƒ«%9̰ ¬èÅÇÀµ ,¶çüØü±%" Utilities for working with Tokio.Á×úüÛ96 This crate is not versioned in lockstep with the coreÁü•@= [`tokio`] crate. However, `tokio-util` _will_ respect Rust'sÁüÖKH semantic versioning policy, especially with regard to breaking changes.Áü¿ üá" ¬èÅÇÀ|µ }çš ´´L
  Ä  ,,   *, 8÷$!& %8÷$&
+*. 1 Â, ; < »+ J K b8âL O a8»<P X7Ž-<Z+ p q Ÿ8äDr z ž8docsrsÁ4{$ 8Óƒ  8â Š œ8»< 7Ž-<•, ­8÷
¼¼Ç ß Ž å ô, æ ç ò, è8÷& í8÷
ó*ö ù Œ, ƒ  +   «8â  ª8»<˜  7ö + ¹ º é8ä à è8åà$ Ê8ÓÌ Ï ç8âÐ Ó æ8» Ü7ö , ÷8÷
¤‘ ¦ ÿ ¬ », ­ ® ¹, ¯8÷& ´8÷
º*½ À ý, Ê Ë ö+ Ù Ú 8âÛ Þ 8£ß â 8» ë7Ô $ ò8» ü7Ž-+   Ú8äD— Ÿ Ù8åà$ ¦8Ó¨ « Ø8⬠¯ ×8£° ³ Ö8»<´ ¼7Ô $ Ã8» Í7Ž-, è8÷
÷œ‚4  ½ œ «,  ž ©, Ÿ8÷$ & ¤8÷
ª*­ ° », º » ´+ É Ê Þ8âË Î Ý8» ×7±M+ ì í ˜8ä ö 8åà$ ý8Óÿ  8⃠ 8»<‡ 7±M$, ¦8÷
µœ½ Ñ ø  × æ, Ø Ù ä, Ú8÷& ß8÷
å*è ë ö , õ ö ï +   8â  ˜ 8» 7 $” + §  ¨  Ó 8ä ±  Ò 8åà$ ¸ 8Óº  ½  Ñ 8â¾  Á  Ð 8» Ê 7 , á 8÷
ð ¼û Tˆ

 
 ¨
, š

 ¦
, œ
8÷$
& ¡
8÷

§
*ª
 ­
 ƒ , ·
 ¸
 ü
+ Æ
 Ç
 à
8âÈ
 Ë
 ß
8
Ì
 Ï
 Þ
8»
 Ø
7
, î
8÷

ý
¬ˆ D•  ž  É  ¤  ³ , ¥  ¦  ± , § 8÷ & ¬ 8÷$­ 
² *µ  ¸  Ç , Â  Ã  À + Ñ  Ò  è 8âÓ  Ö  ç 8»<×  ß 7¼
+ ö  ÷  ¤ 8ä   £ 8åà4 $ 8Ó  Œ  ¢ 8â   ¡ 8»<  7¼
4› , ² 8÷ 
Á  œx$‡K£†J¤µ>¥½TL—:<+-ô Synchronization primitivesÁ$ÉîœgLa»
Àgdw¿
茅H÷g̘Å
ˆkô·ê
‡m¼þ ƒpä—´ Œ¹rlÐÙ Ç„tTßï Èl™ØíÞŒÑü«´ ”$
ê
´ É
í
Œ ¸ KÚ
†J>Ø'lð
ð?FutureÁ4
‚Ø@Œý¨
„¾Ak<¾
ÌC·
œØDœgLÚ
»
EÀgdô
¿
F pin_projectÁ\˜
G¤ƒ
,
»
èŒHô¬Ðü™,üåJG Returns stored cancellation token and removes this drop guard instanceÁü´FC (i.e. it will no longer cancel token). Other guards for this tokenÁ¬ÿ are not affected.Á4 ¬ÐßÑ
¼¸¬Ð"”Öè è¬Ð Þ
Ä™

¿
èŒHôÌÀýëÐÅü”0üàJÄøü¯F˜ù¬úçù4›ëÐ ýßÑ
ýô·8éé¥Ñ"”Üê ê¥Ñ ä
8

%+123489:;=K£†J "¤µ> #¥½T $ŒCE13!Ô»%%¸&Ç 'Ó ’Å Rš§’’Å Rš§’&'œÜ %%µ>µ>¤·>Ç£>¸>poisonÁ£>¹>ç­£>Ë»™z™g—++ù, - .£ /² 0Å T¼d˜ÐórÓÔõ %%çNçNNotifyÁèNº¯DéNwaitersÁ¯D%-Ol“Üÿ)*ܧµÜÿ((
)üòCD€ë ëÜÿ“O“ONotifiedÁ•OnotifyÁ¯DOº¯D—Onotify_waiters_callsÁ¯D˜OwaiterÁ¯Dg™”²ë( (
* ˆT¼d˜ÐórÓ,-./0ìõ ++Û¼ݼÞ¼©ß¼à¼ÛἈcSñŸ«‡zÙ†J†JK‰Jµ 7ŠJphantomÁ7J¤7·0ØQdèÜÿçEçEèEGlobalÁ ¿±‡§í#Œ˜ ++ä¯ ++ªBªBö­Bìe÷<®B÷<9)
-ÜnLÝ…­†”Ñ ++”é ++ü±8d¿ì ìÝ… Ò
1nodeÁ$Ìü´Aí íÝ…Ý… Õ
2üÕ"(œØ" î îˆ ò"
3¾‡$ì"üÑ+žÜÔ+ ñ ñÝ…“ײ5²656 þ+Íì“× ð+Íì Šó+ïð–"“×½T½T¥ÀTlockÁ£>ÁTÚÿ£>0ªk¥aïˆÛ¼ݼÞ¼©ß¼à¼ÛἈcSñŸ«‡zÙ½T½T¥ÀT›Š£>ÁTÚÿ£>0ªk¥aðˆü«,Cïð“׆‹˜" Šë,
4“נо‡$ø+funcÁ$Ž,MPKN¼ú,d…-ü¡=@¼¤= òó òˆ óˆ Â=
8¾‡$¼=4Î=ü BDd£B ôõ ôˆ½T½T¥ÀT›Š£>ÁTÚÿ£>0ªk¥aõˆ ¸B
94°B¾‡$ÈBüÕJ<ÄãJö öÝ… ‚K
:¾‡$üJü×N<ÄåN÷ ÷Ý… „O
;¾‡$þN”úP;<closure_kind>Á<<closure_signature>Á<<upvars>Á<<;<½T½T¥ÀT›Š£>ÁTÚÿ£>0ªk¥aˆÛ¼ݼÞ¼©ß¼à¼ÛἈcSñŸ«‡zÙ½T½T¥ÀT›Š£>ÁTÚÿ£>0ªk¥aˆüY*4žYø øÝ… «Y
=¾‡$¥Y´Ç
rÔã
c¤ƒ
Mt
?
36%(„Ó
¼é
ì†
ø
äá
ü¦M
J A token which can be used to signal a cancellation request to one or moreÁ
 tasks.Áÿ
úüƒA
> Tasks can call [`CancellationToken::cancelled()`] in order to矁J
G obtain a Future which will be resolved when cancellation is requested.Á
úü”S
P Cancellation can be requested through the [`CancellationToken::cancel`] method.Áè
ú
# ExamplesÁû
úlÿ
```no_runÁ´
 use tokio::select;Áü¤,
) use tokio_util::sync::CancellationToken;ÁÑ
ú”Õ
 #[tokio::main]Á¬è
 async fn main() {Áüþ-
* let token = CancellationToken::new();Áü¬)
& let cloned_token = token.clone();ÁÖ
úüÚ3
0 let join_handle = tokio::spawn(async move {ÁüŽ?
< // Wait for either cancellation or a very long timeÁ¬Î
 select! {Áüä1
. _ = cloned_token.cancelled() => {Áü– .
+ // The token was cancelledÁ¬Å
ŒÛ
üí Q
N _ = tokio::time::sleep(std::time::Duration::from_secs(9999)) => {Á´¿
 99ÁŒÖ
ù›

 });Á
úü† !
 tokio::spawn(async move {矬 K
H tokio::time::sleep(std::time::Duration::from_millis(10)).await;ÁÜô
 token.cancel();Á\
°œ
úü  2
/ assert_eq!(5, join_handle.await.unwrap());Á

 ```ÁŒì
ßÑ,|ðÌ_çuIQü„

,„
HHÝ…ü¨
1
ßÑüÝ
4
ßÑüÊ+
ßÑMÀcMüüD
ÿ
ùúû ùßÑ ú c cˆ¢cµ
 `£cìe `àB¤GS
ûÖ¿Ù¿Ú¿«Û¿ˆÜ¿Ý¿Þ¿ˆ‚†f|Â
ŸÈŸÈ ÈÄ éBLL ƒ
L
M$„
± Š
üÇ
ßÑOÙO¼ÿ
üîI
F Creates a clone of the [`CancellationToken`] which will get cancelledÁü¼ >
; whenever the current token gets cancelled, and vice versa.Á,!
ü üßÑßÑN ˆ!
N
O$‰!
ü©"
ßÑQ"Q”Ï"
$Ò"
ý ýßÑP ×"
P
Q$Ü"
ü§#"
ßÑS´SüÐ#!
<Ó#
ßÑRR
S´ž$
ßÑUVWXYZ[\]aüƒ%!
ü»$C
@ Creates a new [`CancellationToken`] in the non-cancelled state.ÁŠ%
ßÑTT
Uüé0.
ü‘&I
F Creates a [`CancellationToken`] which will get cancelled whenever theÁüß&H
E current token gets cancelled. Unlike a cloned [`CancellationToken`],Áü¬'>
; cancelling a child token does not cancel the parent token.Áï'
úü÷'G
D If the current token is already cancelled, the child token will getÁüÃ(
 returned in cancelled state.Áè(
útð(
û–ƒ)
úl)
ž—´)
´—ü¸),
Ô—é)
ú”ñ)
•˜¬ˆ*
°˜ü¢*-
ϘüÔ*.
+ let child_token = token.child_token();Á‡+
úü+3
Å™üÇ+?
‚š¬‹,
Êšü¥,0
- _ = child_token.cancelled() => {ÁüÚ,.
¤›¬-
Û›Œ§-
ù›ü½-Q
”œ´“.
®.
ù›lÄ.
š\Ö.
°æ.
úüî.!
Ñü”/K
üÜä/
О\„0
°”0
úüœ02
ŽŸ,Ó0
ÉŸ<Ý0
ן\ð0
þ þßÑßÑT ü0
T
V$ý0
¤Ç6
ü‚2H
E Cancel the [`CancellationToken`] and all child tokens which had beenÁ¤Ï2
 derived from it.Áè2
úüð2C
@ This will wake up all tasks which are waiting for cancellation.Á¸3
úüÀ3I
F Be aware that cancellation is not an atomic operation. It is possibleÁüŽ4K
H for another thread running in parallel with a call to `cancel` to firstÁüÞ4J
G receive `true` from `is_cancelled` on one child node, and then receiveÁü­5H
E `false` from `is_cancelled` on another child node. However, once theÁüú5H
E call to `cancel` returns, all child nodes have been fully cancelled.Á4Î6
ÿ ÿßÑT Õ6
T
W$Ö6
üÑ7"
ü‘7;
8 Returns `true` if the `CancellationToken` is cancelled.ÁdØ7
 ßÑT å7
Tñˆ$æ7
ü´;8
ü®8L
I Returns a [`Future`] that gets fulfilled when cancellation is requested.Áÿ8
ú”‡9
 Equivalent to:Áž9
úl¦9
```ignoreÁô¸9
 async fn cancelled(&self);Á<Û9
ןç9
úüï9J
G The future will complete immediately if the token is already cancelledÁü¾:
 when this method is called.Áâ:
úÌê:
 # Cancellation safetyÁˆ;
úü;
 This method is cancel safe.ÁL»;
 ᥏
Å
÷gÇ
¥È
œ*åí­äýøsLT Å;
Tω$Æ;
üç@>
üù<L
«¶Ê=
ú”Ò=
Œ·é=
úlñ=
³·üƒ>#
async fn cancelled_owned(self);Á<«>
ן·>
úü¿>J
ЏüŽ?
Þ¸²?
úüº?G
D The function takes self by value and returns a future that owns theÁT†@
 token.Á•@
úÌ@
’¹»@
úüÃ@
Á¹|î@
ßѳÓTT
Z$þ@
üƒC$
üåA+
( Creates a [`DropGuard`] for this token.Á•B
úüBH
E Returned guard will cancel this token (and all its children) on dropÁ¤êB
 unless disarmed.ÁTŠC
ßѬÐTT
[$•C
üþD0
üÝC.
+ Creates a [`DropGuardRef`] for this token.ÁD
úü˜DH
½¾¤åD
Ž¿t…E
 ᥨ
¿
ÀgÁ
Çl£¹Ð„‘¼T ”E
T
\$•E
ü®Jd
üçET
Q Runs a future to completion and returns its result wrapped inside of an `Option`ÁüÀFT
Q unless the [`CancellationToken`] is cancelled. In that case the function returns矪G'
$ `None` and the future gets dropped.ÁÅG
útÍG
# FairnessÁàG
úüèGG
D Calling this on an already-cancelled token directly returns `None`.Áü´HB
? For all subsequent polls, in case of concurrent completion andÁüûH?
< cancellation, this is biased towards the future completion.Á¿I
úÌÇI
’¹åI
úüíI<
9 This method is only cancel safe if `fut` is cancel safe.Áœ»J
ƒ ƒßѓד׃_T^^ ÒJ
TÏŠ ÏJ
‚Ø“×4K
¾ŸHXú–Z&(ˆ®äJ
]8ÈÈ]`“×ðò„‡ 8ßÑ“×Íì“×8_]‚Ø—Él—Ƀ؄‡~É©ÉЏÉ]€a]<coroutine_kind>Á` <resume_ty>Á`
<yield_ty>Á` <return_ty>Á`Ï``]ñ†ü§Ri
ü…MT
ÎÁüÞMT
¬Âü·N'
ŠÃãN
úüëNN
K The function takes self by value and returns a future that owns the token.Á¾O
útÆO
ÆÃÙO
úüáOG
êÃü­PB
»ÄüôP?
‡Å¸Q
úÌÀQ
’¹ÞQ
úüæQ<
õÅÌ´R
ßѓד×cTbbTÏŠ ÎR
›È4‰S
a“×Rú–R"$ˆµâR
aa¢žÍì Í#‚Ø Í2 ÍƒØ„‡DÎJžÎP­ÎVaCXaûÈd•ÉdªÉd¾ÉdÏdda¢žüûS;
ýffíÒgÀcg€T
ü½TD
ÀT
 íÒ  c cˆ¢cµ
 `£cìe `àB¤GS
é¢e ÄT
e
gý$ÅT
± ËT
üÊU1
ýiiíÒjkƒØ„ØkÏU
\V
4‡V
hhü™V?
$œV
ˆ„¾„¾Œý†¾ ˜X$]È=„kt• íÒ ˆÌÌkÎÓ¸Ïíú¸Ð†û¸Ñ—û¸Ò¬û¸f'EwÚ]¾å´h «V
h
ký$¡V
cxÁ·V
ü“\8
³ÓmÀcmüÒ\D
Õ\
ŠŒ Š³Ó  c cˆ¢cµ
 `£cìe `àB¤GS
Œé¢l Ù\
l
m$Ú\
± à\
üä]#
³ÓopüŽ^5
^
ßѳÓnn
o¥”•^
üÛcv
Tåc
 ßÑ“O“O¼‚•OÍ‚¯D–Oº¯D—O낯D˜O‹ƒ¯Dg™”²n d
n
p¥”ùc
ü¨g.
³ÓrsƒØ„Øs\Ýg
4âg
qqüôg?
$÷g
Ž„¾„¾Œý†¾ ˜X$]È=„kt• Ž³Ó ÌÌkÎÓ¸Ïíú¸Ð†û¸Ñ—û¸Ò¬û¸f'EwÚ]¾å´q †h
q
s$üg
ùÒh
üžr2
ýuvuvÍì™È §r
‚Ø™È4ªr
·Õw£r
!#ü×rO
år
¹ý™È·Õtt
wý™È¥”ér
œ*4”s
ü™t=
ýyzyzÆÚ ¢t
×Ú4¥t
·Õ{|ƒØ„Ø|žt
')\Ýt
4ât
xxÛ¼ݼÞ¼©ß¼à¼ÛἈcSñŸ«‡zٙȃØüƒuI
$†u
„¾„¾Œý†¾ ˜X$]È=„kt• ·Õ ÌÌkÎÓ¸Ïíú¸Ð†û¸Ñ—û¸Ò¬û¸f'EwÚ]¾åœØžØŸØÈ Øˆ¡Ø¢Ø´‰‰Nµý¤Ã·ÕƒØx •u
x
|ý™È$‹u
ùÒ¡u
ü‘{:
~~ÏŠ {
›È4™{
Ûփ؄Ø#%\Ò{
4×{
}}„‡üø{I
$û{
„¾„¾Œý†¾ ˜X$]È=„kt• ÛÖ ÌÌkÎÓ¸Ïíú¸Ð†û¸Ñ—û¸Ò¬û¸f'EwÚ]¾åœØžØŸØÈ Øˆ¡Ø¢Ø´‰‰Nµý¤ÃÛÖƒØ} Š|
}
“×$€|
ùÒ|
üÙ~/
ÏŠ Þ~
›È4á~
ÛÖƒüK

ßÑ“×ÛÖ
ƒ“×¥”¡
œ*4È
”@„Z¨7¼l777„7‡7x7{7”ép7s7b7e7D·¡¦Ù Ú ï à ÷ ø SinkÁ$ 
ŽŒý& „¾k<; Ì·$D œØ×U ¤,íZ ëž±\w Ö>©f4 Ç>ÞŒ¯ ü˜« ½l ®L/ Ÿ¡ŽO prôd b̈ TĨ EÄÀ ¥ššÍḭ̀ Å ¬× 
ü¿$ üß& # Consumes the stored value, if any.ÁŠ úü’^ [ If this error was encountered when calling `start_send`/`send_item`, this will be the itemÁüõE B that the caller attempted to send. Otherwise, it will be `None`.ÁTÆ ¬×ñÖ
̰ üþ) ¥Ïç ƒ ¬×žÅcžü®: ± ˜ ¬× ˜ c cˆ¢cµ
 `£cìe `àB¤GS
颜 µ œ
ž̰ ×¼ üš: ¥  Ïç Ÿ ¿c̰ ¬×üŠ k œ“ Û²̰£¥¢¢Ïç §
¡̰ç­$Vø¿Í ( ¡¡²±Íì“í&‚Ø“í5“íƒØƱG÷íM†îS•îY¡^¡ûȤ•ɤªÉ¤¾É¤Ï¤¤¡²±í
¡š¥²¥Ï¥¥¡Œº¼â  ý§¥¨¨§Í쪱 ÷ üüÞÿîîÎRŒ\7øýÖ¿Ù¿Ú¿«Û¿ˆÜ¿Ý¿Þ¿ˆ‚†f|Â
Ö>Ö>ž±Ø>²±¹>óëtÏ<
ª±Ù Ù Ú ¹rÜ ˆ ùį¦ib\ª±ó õ÷Ü𠥪ªÏç õ ÉÙ« 
”Ò  ÉÙ©©
«̰ «ûȬ•ɬªÉ¬¾É¬Ï¬¬«öÌüÖ! ¥®®Ïç Û Ìḭ̀ ÉÙ¯°±"$„© ¬ ÉÙ­­
¯̰üÏZ  šœ šÉÙ ÌÌkÎÓ¸Ïíú¸Ð†û¸Ñ—û¸Ò¬û¸f'EwÚ]¾åœ‘È­ × ­
°̰ ùÒâ üñ, ô  ÉÙÛ²­ ø ­
±̰ žt4ƒ Ü€ ¥³³Ïç  ¸ô øØ´µ·¸¹º»(*üÆ% ü¢  Creates a new `PollSender`.ÁÍ  ³øØ²²
´̰žt4Ñ ü’ $ T• ž žøØÿײ   ²
µ̰ ü‡&Z üù 6 3 Attempts to prepare the sender to receive a value.Á´! úü¼!U R This method must be called and return `Poll::Ready(Ok(()))` prior to each call toÁ„–"
`send_item`.Á«" úü³"^ [ This method returns `Poll::Ready` once the underlying channel is ready to receive a value,Áü–#V S by reserving a slot in the channel for the item to be sent. If this method returnsÁüñ#G D `Poll::Pending`, the current task is registered to be notified (viaÁü½$K H `cx.waker().wake_by_ref()`) when `poll_reserve` should be called again.Á% úd•% # ErrorsÁ¦% úü®%T Q If the channel is closed, an error will be returned. This is a permanent state.ÁdŽ& Ÿ ¡ ŸøØ  ÌÌkÎÓ¸Ïíú¸Ð†û¸Ñ—û¸Ò¬û¸f'EwÚ]¾å¡œØžØŸØÈ Øˆ¡Ø¢Ø´‰‰Nµý¤ÃÖ¿Ù¿Ú¿«Û¿ˆÜ¿Ý¿Þ¿ˆ‚†f|Â
¬×² & ²
̰$ & ùÒ¦& üç5E üŽ2!  Sends an item to the channel.Á´2 úü¼2V S Before calling `send_item`, `poll_reserve` must be called with a successful returnÁü—3# value of `Poll::Ready(Ok(()))`.Á¿3 údÇ3 ðýØ3 úüà3T ’þ¹4 údÁ4 # PanicsÁÒ4 úüÚ4` ] If `poll_reserve` was not successfully called prior to calling `send_item`, then this methodÁ|¿5 will panic.Á²|Ó5 Lî5 ¢ ¢øØ̰ಠø5 ²
·̰$ý5 »,ƒ6 üæ= üà<) & Checks whether this sender is closed.ÁŽ= úü–=K H The underlying channel that this sender was wrapping may still be open.ÁLí= £ £øØ² ÷= ²
¸̰$ø= ü±@+ üØ>? < Gets a reference to the `Sender` of the underlying channel.Áœ? úü¤?` ] If `PollSender` has been closed, `None` is returned. The underlying channel that this senderÁü‰@# was wrapping may still be open.Á<¸@ ¤ ¤øØÛ¼ݼÞ¼©ß¼à¼ÛἈcSñŸ«‡zÙ 
<9 - `Poll::Ready(Some(permit))` if a permit was acquired.ÁüÙ
<9 - `Poll::Ready(None)` if the semaphore has been closed.Áš úü¢ KH When this method returns `Poll::Pending`, the current task is scheduledÁüò DA to receive a wakeup when a permit becomes available, or when theÁü» LI semaphore is closed. Note that on multiple calls to `poll_acquire`, onlyÁüŒ
DA the `Waker` from the `Context` passed to the most recent call isÁüÕ
" scheduled to receive a wakeup.Ádƒ´µ ´žÚ µÌÌkÎÓ¸Ïíú¸Ð†û¸Ñ—û¸Ò¬û¸f'EwÚ]¾åœØžØŸØÈ Øˆ¡Ø¢Ø´‰‰Nµý¤ÃÛ¼ݼÞ¼©ß¼à¼ÛἈcSñŸ«‡zÙÕ©Û Û
à$•ùÒüªŒüŠ41 Poll to acquire many permits from the semaphore.ÁÃúüË)¥®ùúü>ä®üÄ<¬¯ü…<ò¯ÆúüÎKİüžFC to receive a wakeup when the permits become available, or when theÁüéLç±üºD½²üƒ"‹³Œ±·¸¹ ·žÚ ¸ÌÌkÎÓ¸Ïíú¸Ð†û¸Ñ—û¸Ò¬û¸f'EwÚ]¾å¹áµÛ ÌÛ
áùÒßø¨üÑ$(ü¼"41 Returns the current number of available permits.Áõ"úüý"LI This is equivalent to the [`Semaphore::available_permits`] method on theÁüÎ#" `tokio::sync::Semaphore` type.Áõ#úüý#OL [`Semaphore::available_permits`]: tokio::sync::Semaphore::available_permitsÁŒØ$º ºžÚÛ ê$Û
â$ë$ü·(#ü²%*' Adds `n` new permits to the semaphore.Áá%úüé%RO The maximum number of permits is [`Semaphore::MAX_PERMITS`], and this functionÁüÀ&(% will panic if the limit is exceeded.Áí&úüõ&FC This is equivalent to the [`Semaphore::add_permits`] method on theÁüÀ'"Ý»ç'úüï'C@ [`Semaphore::add_permits`]: tokio::sync::Semaphore::add_permitsÁ\¾(» »žÚÛ Ê(Û
ã$Ë(¹ Ñ(ì)žÚåæFGæL±)$¶)ääÕ©üØ)^LÛ)¼½¾„¾„¾Œý†¾ ˜X$]È=„kt• ¼žÚ ½ÌÌkÎÓ¸Ïíú¸Ð†û¸Ñ—û¸Ò¬û¸f'EwÚ]¾å¾áµä ï)ä
æ$å)ùÒû)äñ*žÚèÙèü”+ ,—+¿ ¿žÚžÚç +ç
è$ž+üï+!žÚêÀcêü—,8š,ÀÁ ÀžÚ Á c cˆ¢cµ
 `£cìe `àB¤GS
Âé¢é ž,é
ê$Ÿ,± ¥,üÊ-'žÚìâìôø-4û-Ã ÃžÚ ÃùÚë ‚.ë
ì$ƒ.ì‰Æh„©ü˜ž 4èØîï×!¤,îðœ*$8äîòßö4>‚Øîóí$Vëîõ ManuallyDropÁd\ÃÛîöŒýy„¾î÷µ îøk<œÌîú·œØîûÞDÎ\*¿4/¯±DK¡PˆlowDhLZ\HJüï#ü­>; A reusable `Pin<Box<dyn Future<Output = T> + Send + 'a>>`.ÁìúüðC@ This type lets you replace the future stored in the box withoutÁü´:7 reallocating when the size and alignment permits this.ÁŒúýý¥þýþ¤ð üüÞÿîîÎRŒ\7øýª±îÎRŒ\7øÿŒXZü™3,™îüü„¾„¾Œý†¾ ˜X$]È=„kt•žBoxÁ¡ˆˆ¢ˆl }.xς؃ت±Ììý­†üÑ$ý¥¤ð ڄ̓ŽÖüÈUüüGD Create a new `ReusableBoxFuture<T>` containing the provided future.ÁÏÀÇ„ÍÍìÀÇ Ó‚ØÀÇ”þÀǃت±T…ÌìÀÇ$“ÀÇýš
ƒýª±ÀÇœ*4Ödfü½Xüí41 Replace the future currently stored in this box.Á¦úü®HE This reallocates if and only if the layout of the provided future isÁüû=: different from the layout of the currently stored future.ÁÄÄ Ä„ÍÀÇ ËˆÑ È™Ñ”öªÑ¾Ñ$‹ÏÑ
ýª±ÀÇœ*4ÖFHüö
müŒ 4˜ÑÅ úüÍ IF This function never reallocates, but returns an error if the providedÁü›
FC future has a different size or alignment from the currently storedÁ
 future.Á<ý
Å Å„ÍÀÇÖ¿Ù¿Ú¿«Û¿ˆÜ¿Ý¿Þ¿ˆ‚†f|Â
ÀLjˆ ˆ ˆÑ ™Ñ”Ä ªÑ ¾Ñ ÏÑà 
ýª±ÀÇ$ œ*4“ FHü³dîÆ ÆüüÞÿîîÎRŒ\7øý‘Ý™ÈÖ¿Ù¿Ú¿«Û¿ˆÜ¿Ý¿Þ¿ˆ‚†f|Â
™ÈýŠŠ ·ÆÚ ¡×ÚÌì™È™Èý½
ý™ÈthisÁ$±œ*4êUWŠšŒ²ŒÏŒŒŒ™Èž¿Í¡ˆˆ¢ˆl }.xϙȭ† „¾„¾Œý†¾ ˜X$]È=„kt•ž¿Í¡ˆˆ¢ˆl }.xς؃ؑÝÌì­†ü¥Füì41 Get a pinned reference to the underlying future.Á<¬Ç DŽ̈́¾„¾Œý†¾ ˜X$]È=„kt• ǂ؃ت±ÌìÇ ´
ýª±üÅ7ü•+( Poll the future stored inside this box.Á$ÌÈÉÊ È„Í ÉÌÌkÎÓ¸Ïíú¸Ð†û¸Ñ—û¸Ò¬û¸f'EwÚ]¾åʜ؞؟ØÈ Øˆ¡Ø¢Ø´‰‰Nµý¤Ãª± Ñ
Žýª±ùÒÜü¨+8˥ˤ𠭾ۃ؄ت±ü >üð+ßÌÍ΄¾„¾Œý†¾ ˜X$]È=„kt• Ì¾Û ÍÌÌkÎÓ¸Ïíú¸Ð†û¸Ñ—û¸Ò¬û¸f'EwÚ]¾åÎþá ²
8ª±ùÒ¾üÕ08ϥϤð á¾Û
üŠ/8ХФð ¾ÛÀcüÀ8ÃÑÒÓ Ñ¾Û Ò c cˆ¢cµ
 `£cìe `àB¤GS
Óé¢ Ç
8ª±± Îü¹î„¾„¾Œý†¾ ˜X$]È=„kt•ž¿Í¡ˆˆ¢ˆl }.xḬ̈­†Ò°Ö¿Ù¿Ú¿«Û¿ˆÜ¿Ý¿Þ¿ˆ‚†f|Â
 Ò°¥¦š œœšÎḭ̀ ÊÍìÒ° ÕÍìàê ØÍìê Û–"ꞿ͡ˆˆ¢ˆl }.xÏÒ°­†œªê€ì˜"àê ¼
˜̰Ò°àêê‡ ,Þ new_valueÁLòcallbackÁD€åçáãÝßÙÛ˜š²Ï˜̰Ò°àêêàê  ̰Ò°êüÀ#&TÇ#î Ÿ  ŸÍìÀÜ Ò#ÆÚ Õ#–"™ÈlØ#™È˜"ÀÜ ä#’ÜM&iñ.iãÏ¡ªRTWY”í# í#îžžÃÛÃÛ¶ÈÅÛ»¬µÜÀ,%*™Èü„$* £¤£¤»ï ›$ÆÚ Œ$¨ïl$ï ‰$’Ü¥¦+-¤µ$¸$î™È’Ü¢¢
¥Àܙȱ ¼$%$’%î’ÜÀÜ¢¢
¦ÀÜ™È$—%ü¥&3 ¨©©¨»ï ¼&ÆÚ ­&¨ïl°&ï ª&’ܪ"ª02”ß&$â&Ô Ô’Ü§ ç&§
ªÀÜ™È$ì&üô~tü# Module defining an Either type.Áþ ßö4;‚ج®SeekFromÁDKñL¬¯Œý^„¾¬°k<n̬²·$wœØ¬³ AsyncBufReadÁd`¬µ AsyncReadÁLŸ|¬ AsyncSeekÁLª¬·
AsyncWriteÁTµ¯¬¸ReadBufÁ<Á嬹Íݬº(t3dGDYøü(CêìÙÛL…À§©Žsu[]JLÔÉ ä  ê 
, ë8& ð8¼ ö, ÷8methodÁ& þ8¼,ÿ  ,   , 8À$ˆ& Œ8¼,$  *˜  8" ¬ 8, À8 Å8get_unchecked_mutÁŒÆ × Ø Ú 8'ð8¸u ö ø8· ÷*ú8Œýý'8ð l  8·  , 8¢÷4” š ¥,  œ ¢, 8À$ £ ¤$ ¦8$¸'¼8Ñu à Å8½ Ä*Ç8ŒýÊ'Í8ð  Ü Þ8½ Ý ß, à8¢÷ ç ò, è é ï, ê8À$ ð ñ$ óü–a½£¾ ¿¾¿½™ÝƒØàêºÇƒØàêÓë ¡‚ؙݔÉÍì™Ý ‚غǔäÍìºÇ žÑÜÀÁƒØ„ØÁ>@)+z|¼¼àêü”I$—ÕÖׄ¾„¾Œý†¾ ˜X$]È=„kt• ÕÑÜ ÖÌÌkÎÓ¸Ïíú¸Ð†û¸Ñ—û¸Ò¬û¸f'EwÚ]¾åל؞؟ØÈ Øˆ¡Ø¢Ø´‰‰Nµý¤ÃÑ܃ؼ ¦¼
Á™ÝºÇàêùÒ²üOãÄÃļþ Þþ |™Ý|ºÇÑÜÅ}Å8:=?üåØÙÚÛÜ„¾„¾Œý†¾ ˜X$]È=„kt• ØÑÜ ÙÌÌkÎÓ¸Ïíú¸Ð†û¸Ñ—û¸Ò¬û¸f'EwÚ]¾åÚ ÛååáõçìeâèfilledÁâé initializedÁâá‹™wP Óܜ؞؟ØÈ Øˆ¡Ø¢Ø´‰‰Nµý¤ÃÖ¿Ù¿Ú¿«Û¿ˆÜ¿Ý¿Þ¿ˆ‚†f|Â
ÃÂÂ Â
řݺÇùÒìe·ü£XÇ£ÈÇȼþ ¨Þþ «`™Ý`ºÇÑÜÉÊabÊÉBDGIü‚Sl…ÝÞß„¾„¾Œý†¾ ˜X$]È=„kt• ÝÑÜ ÞÌÌkÎÓ¸Ïíú¸Ð†û¸Ñ—û¸Ò¬û¸f'EwÚ]¾åߜ؞؟ØÈ Øˆ¡Ø¢Ø´‰‰Nµý¤ÃÖ¿Ù¿Ú¿«Û¿ˆÜ¿Ý¿Þ¿ˆ‚†f|Â
 ÝèÆÃÂÆ Æ
əݺÇ$“ùÒ©ü’,<•à„¾„¾Œý†¾ ˜X$]È=„kt• àÑÜÆ §Æ
ʙݺÇ$amtÁ³üõOÌ£ÍÌͼþ úÞþ ý™ÝºÇÑÜÎÏÏÎFHKMüËEᄾ„¾Œý†¾ ˜X$]È=„kt• áÑÜñLòLóLStartÁôLˆõLöLEndÁ÷LˆøLùLCurrentÁúLˆaÍ>4¡9cÅç†Ë ãË
ΙݺÇpositionÁDïüÐQâã䄾„¾Œý†¾ ˜X$]È=„kt• âÑÜ ãÌÌkÎÓ¸Ïíú¸Ð†û¸Ñ—û¸Ò¬û¸f'EwÚ]¾åäœØžØŸØÈ Øˆ¡Ø¢Ø´‰‰Nµý¤ÃÖ¿Ù¿Ú¿«Û¿ˆÜ¿Ý¿Þ¿ˆ‚†f|Â
ÃÂË ëË
ϙݺÇùÒ÷üÜRÑ£ÒÒѼþ áÞþ 䯙ÝT¯ºÇÑÜÓÔÕÖ×°±²³Ó×ÖÔÕgilnüµ\T¸åæç脾„¾Œý†¾ ˜X$]È=„kt• åÑÜ æÌÌkÎÓ¸Ïíú¸Ð†û¸Ñ—û¸Ò¬û¸f'EwÚ]¾åç èèÆ
æLæLçLIoSliceÁéLˆ¦ —óë@M$Tó²ýÐ ¤"Ð
֙ݺÇ$š"ùÒ¸"bufsÁ$Ö"ü÷##Œú#ô ôÑÜÐ Œ$Ð
יݺÇ$$ü®%˜Ù£ÚÙÚºÇF™ÝFt¶&Þþ ¶%E™Ýäô%EºÇü™&,¼þ ³%ÑÜÛÜFGÜLNLÍ&$Ò&ØØŽ¡üç&TLê&õö÷„¾„¾Œý†¾ ˜X$]È=„kt• õÑÜ öÌÌkÎÓ¸Ïíú¸Ð†û¸Ñ—û¸Ò¬û¸f'EwÚ]¾å÷œØžØŸØÈ Øˆ¡Ø¢Ø´‰‰Nµý¤ÃÛ¼ݼÞ¼©ß¼à¼ÛἈcSñŸ«‡zÙÑÜFØ þ&Ø
ܙݺÇ$ô&ùÒŠ'üò'§Þ£ßàÄáÞáßà™ÝøÝ ÄlÚ(ºÇøÝ  ¦lŠ)ÍìøÝ$ý'Íì ¦,ƒ(
™ÝøÝüÁ('¼þ ÷'
ºÇøÝüñ('Þþ ú'ÑÜâãäåæ 
åãæäRTCET ),¥)ÝÝ ¦ü¹)~T¼)øùú„¾„¾Œý†¾ ˜X$]È=„kt• øÑÜ ùÌÌkÎÓ¸Ïíú¸Ð†û¸Ñ—û¸Ò¬û¸f'EwÚ]¾åúœØžØŸØÈ Øˆ¡Ø¢Ø´‰‰Nµý¤ÃÖ¿Ù¿Ú¿«Û¿ˆÜ¿Ý¿Þ¿ˆ‚†f|Â
ÑÜøÝ Ý Ú)Ý
ã™ÝºÇøÝ ¦$Ð)ùÒî)üñ*WTô*û„¾„¾Œý†¾ ˜X$]È=„kt• ûÑÜøÝΪÝ ‰+Ý
ä™ÝºÇøÝ ¦$ÿ*÷$•+ü„,~T‡,üýþ„¾„¾Œý†¾ ˜X$]È=„kt• üÑÜ ýÌÌkÎÓ¸Ïíú¸Ð†û¸Ñ—û¸Ò¬û¸f'EwÚ]¾åþ‰ªÝ ¥,Ý
å™ÝºÇøÝ ¦$›,ùÒ¹,ü¼-~T¿-ÿ„¾„¾Œý†¾ ˜X$]È=„kt• ÿÑÜ ÌÌkÎÓ¸Ïíú¸Ð†û¸Ñ—û¸Ò¬û¸f'EwÚ]¾å‰ªÝ Ý-Ý
æ™ÝºÇøÝ ¦$Ó-ùÒñ-ƒª†ªD¾éÿ Ø'lqð©)lû Î)tŠ šk<çÌè ·œØè tèðñßö4‚ØéêçÚ\)ÑÛéëŒýE„¾éìk<[Ìéî·$dœØéï¤j´Yt:HTN9;(*¥òòÏç Ú …ÞÅxk„\ñóÛÛ…Þö­¬TéÛÛ…Þðð
ñ̰oqéððÛÛüï !¥õõÏç ô …Þö"ö”—

 …Þô Ÿ
ô
ö̰
Ä¥ ¥øøÏç ª …Þù 
üÄ #Ò ̰…Þ÷÷
ṵ̀Ç ü™ +ûûÏŠ ž ›È ÃÞüýƒØ„Øý$&  úúɇüé I ƒ„¾„¾Œý†¾ ˜X$]È=„kt• ƒÃÞ ÌÌkÎÓ¸Ïíú¸Ð†û¸Ñ—û¸Ò¬û¸f'EwÚ]¾åœØžØŸØÈ Øˆ¡Ø¢Ø´‰‰Nµý¤ÃÃÞƒØú û ú
ý“× ùÒ
4•ýšþ²þÏþþýþ“× ÃÞ “×dC»±Mt»Ž-Œ.ü#ü.DGè‡õL|ÿÂõT¯ÿáõ<'åÿƒBufÁ>ÿBufMutÁ4Cÿ±M$Z¦ÿˆƒž<`æLÿŒýx„¾ÿŠ­¢,¥‚ÿŒk<”Ìÿ·$œØÿŽLïñßáÎÐ,6¾À©«<PœUŒŽln~Lnp\^JLüæ ”ü¥UR Try to read data from an `AsyncRead` into an implementer of the [`BufMut`] trait.ÁûúÔÿ [`BufMut`]: bytes::BufÁšú
# ExampleÁ¬úןü¸! use bytes::{Bytes, BytesMut};ÁüÚ use tokio_stream as stream;ÁÔú use tokio::io::Result;Áü•63 use tokio_util::io::{StreamReader, poll_read_buf};ÁìÌ use std::future::poll_fn;Á´ê use std::pin::Pin;Áü/, # #[tokio::main(flavor = "current_thread")]Áü±.+ # async fn main() -> std::io::Result<()> {ÁàúüäNK // Create a reader from an iterator. This particular reader will always beÁ
// ready.ÁüÁhe let mut read = StreamReader::new(stream::iter(vec![Result::Ok(Bytes::from_static(&[0, 1, 2, 3]))]));Áªúü®" let mut buf = BytesMut::new();Á´Ñ let mut reads = 0;Áèú loop {Áœ÷ reads += 1;Áü‹VS let n = poll_fn(|cx| poll_read_buf(Pin::new(&mut read), cx, &mut buf)).await?;Áâúœæ if n == 0 {Á”ú break;ÁL,—ÉŸúü¡,) // one or more reads might be necessary.ÁÄÎ assert!(reads >= 1);Áüç(% assert_eq!(&buf[..], &[0, 1, 2, 3]);Ád  # Ok(())Á<  # }Áןˆ„¾„¾Œý†¾ ˜X$]È=„kt• ̰ ÌÌkÎÓ¸Ïíú¸Ð†û¸Ñ—û¸Ò¬û¸f'EwÚ]¾åˆ ïϲý¥ ª
±ë û ÍìïÏ
|̰ïÏ4•

̰ïϱM¢
ùÒ·
ìeÑ
Z\VXüÜü¯DA Try to write data from an implementer of the [`Buf`] trait to anÁüô;8 [`AsyncWrite`], advancing the buffer's internal cursor.Á°úü´MJ This function will use [vectored writes] when the [`AsyncWrite`] supportsÁ¤‚ vectored writes.Áút›û–ªúü®GD [`File`] implements [`AsyncWrite`] and [`Cursor<&[u8]>`] implementsÁ [`Buf`]:Áƒúl‡ž—ü•'$ use tokio_util::io::poll_write_buf;Á”½ use tokio::io;ÁÄÐ use tokio::fs::File;Áéúœí use bytes::Buf;Áì‘ÁÄŸ use std::io::Cursor;Á´¸·ÁÏú”Ó•˜üæ'$ async fn main() -> io::Result<()> {ÁüŽ63 let mut file = File::create("foo.txt").await?;ÁüÅ41 let mut buf = Cursor::new(b"data to write");ÁúúüþFC // Loop until the entire contents of the buffer are written toÁ¤Å // the file.ÁüÚ# while buf.has_remaining() {ÁüþSP poll_fn(|cx| poll_write_buf(Pin::new(&mut file), cx, &mut buf)).await?;ÁèÆÜú Ok(())ÁÉŸןýú¼ [`Buf`]: bytes::BufÁü™)& [`AsyncWrite`]: tokio::io::AsyncWriteÁìà [`File`]: tokio::fs::FileÁüáA> [vectored writes]: tokio::io::AsyncWrite::poll_write_vectoredÁŠŒ„¾„¾Œý†¾ ˜X$]È=„kt• Š̰ ÌÌkÎÓ¸Ïíú¸Ð†û¸Ñ—û¸Ò¬û¸f'EwÚ]¾åŒ ïϲý¥ Ÿ±ë òúË Š¯̰ïÏ
̰ïϱMùÒ¬ìeÆQSVX¬öÿìaŸŠüRO An extension trait for Futures that provides a variety of convenient adapters.Áœ¿óvÜ »Éyü¬ À ¼ßö‚ؽèŒûH¾ÜT¼X À à ßö4‚ØœžŒý(„¾œŸk<8Ìœ¡·$AœØœ¢Û÷\bœ£èŒ‚Hœ¥‡m¼• œ¦ƒpä®´ œ§Œt¶D#¥ü1ˆìPw\thjTV?Aü¨6ý©ªª©ÆÚ ±×ÚËß«­üåOó¹ý™ÈËߨ¨
«ý™È¥”÷œ*4¢¢«š¬²¬Ï¬¬«¬™È  ‡mŠ ¶m œ*ËÈ#j}´€™Èׇ™ÈüóAý®¯®¯ÆÚ ü×Ú4ÿËß°±ƒØ„رø*,­­ÌÜüá IŽ„¾„¾Œý†¾ ˜X$]È=„kt• ŽËß ÌÌkÎÓ¸Ïíú¸Ð†û¸Ñ—û¸Ò¬û¸f'EwÚ]¾åœØžØŸØÈ Øˆ¡Ø¢Ø´‰‰Nµý¤ÃË߃ح ó ­
±ý™ÈùÒÿ üÃ3³³ÏŠ È›ÈÛà´üýKßÑ“×Ûಲ
´“×¥œ*4¶´šµ²µÏµµ´µ“×ÛÖ¹žüŒ>··ÏŠ ›È4”ÛูƒØ„ع$&„‡ü÷I„¾„¾Œý†¾ ˜X$]È=„kt• Ûà ÌÌkÎÓ¸Ïíú¸Ð†û¸Ñ—û¸Ò¬û¸f'EwÚ]¾åœØžØŸØÈ Øˆ¡Ø¢Ø´‰‰Nµý¤ÃÛàƒØ 
¹“×$ÿùÒ¼uqtbeœÔUôîFÜèüXU A trait which contains a variety of convenient adapters and utilities for `Future`s.Á¿¿Îìüè‚Ø
ϰ
É ç ¸ ñ , ò ó þ, ô8÷& ù8÷
ÿ*  ²,   §+ ¦ § À8⨠« ¿8» ´7¨ + Ò Ó ƒ8ä Ü 8åà$ ã8Óå è 8âé ì 8» õ7¨ , 8÷$
¨»Ž-ˆ PÈ J,
  z  %,   #, 8argÁ& 8¯!
$*' * w+ 4 5 N8â6 9 M8»<: B7ó,LD8ó,<X'_8-,a f g p, h i n, j8öýk
o% q% xü96 Adaptors from `AsyncRead`/`AsyncWrite` to Stream/SinkÁ:úü>KH Raw I/O objects work with byte sequences, but higher-level code usuallyÁüŠA> wants to batch these into meaningful chunks, called "frames".ÁÌúüÐPM This module contains adapters to go from streams of bytes, [`AsyncRead`] andÁü¡KH [`AsyncWrite`], to framed streams implementing [`Sink`] and [`Stream`].Áüí0- Framed streams are also known as transports.Ážúü¢)& # Example encoding using `LinesCodec`ÁÌúüÐSP The following example demonstrates how to use a codec such as [`LinesCodec`] toÁü¤PM write framed data. [`FramedWrite`] can be used to achieve this. Data sent toÁüõTQ [`FramedWrite`] are first framed according to a specific codec, and then sent toÁüÊ%" an implementor of [`AsyncWrite`].Áðúןüü use futures::sink::SinkExt;Áüœ&# use tokio_util::codec::LinesCodec;ÁüÃ'$ use tokio_util::codec::FramedWrite;Áëúüï/×Á¼Ÿ # async fn main() {Áä· let buffer = Vec::new();ÁüÔ*' let messages = vec!["Hello", "World"];Áüÿ$! let encoder = LinesCodec::new();Á¤úü¨DA // FramedWrite is a sink which means you can send values into itÁ´í // asynchronously.Áü„ 74 let mut writer = FramedWrite::new(buffer, encoder);Á¼ úüÀ JG // To be able to send values into a FramedWrite, you need to bring theÁü‹
" // `SinkExt` trait into scope.Áü®
,) writer.send(messages[0]).await.unwrap();ÁüÛ
,) writer.send(messages[1]).await.unwrap();Áˆ úüŒ " let buffer = writer.get_ref();Á¯ úü³ ?< assert_eq!(buffer.as_slice(), "Hello\nWorld\n".as_bytes());Á ±È ```Á úü† )& # Example decoding using `LinesCodec`Áü° S‚„ü„
\Y read a stream of framed data. [`FramedRead`] can be used to achieve this. [`FramedRead`]Áüá
b_ will keep reading from an [`AsyncRead`] implementor until a whole frame, according to a codec,Á”Ä can be parsed.Á×úõüâ  use tokio_stream::StreamExt;Áüƒ&ˆ‡üª&# use tokio_util::codec::FramedRead;ÁÑúüÕ/×Á¼…‚ˆü,) let message = "Hello\nWorld".as_bytes();ÁüÊ$! let decoder = LinesCodec::new();ÁïúüóUR // FramedRead can be used to read a stream of values that are framed according toÁüÉWT // a codec. FramedRead will read from its input (here `buffer`) until a whole frameÁ¬¡ // can be parsed.Áü·74 let mut reader = FramedRead::new(message, decoder);Áïúüó>; // To read values from a FramedRead, you need to bring theÁü²$! // `StreamExt` trait into scope.Áü×74 let frame1 = reader.next().await.unwrap().unwrap();Áü74 let frame2 = reader.next().await.unwrap().unwrap();ÁÇúüË+( assert!(reader.next().await.is_none());Áü÷  assert_eq!(frame1, "Hello");Áü˜  assert_eq!(frame2, "World");Á±ÈןÉú¼Í # The Decoder traitÁåúüéOL A [`Decoder`] is used together with [`FramedRead`] or [`Framed`] to turn anÁü¹OL [`AsyncRead`] into a [`Stream`]. The job of the decoder trait is to specifyÁü‰GD how sequences of bytes are turned into a sequence of frames, and toÁüÑFC determine where the boundaries between frames are. The job of theÁü˜NK `FramedRead` is to repeatedly switch between reading more data from the IOÁüçLI resource, and asking the decoder whether we have received enough data toÁü´! decode another frame of data.ÁÖúüÚPM The main method on the `Decoder` trait is the [`decode`] method. This methodÁü«PM takes as argument the data that has been read so far, and when it is called,Áüü2/ it will be in one of the following situations:Á¯úü³30 1. The buffer contains less than a full frame.Áüç1. 2. The buffer contains exactly a full frame.Áü™30 3. The buffer contains more than a full frame.ÁÍúüÑA> In the first situation, the decoder should return `Ok(None)`.Áúü—MJ In the second situation, the decoder should clear the provided buffer andÁüå)& return `Ok(Some(the_decoded_frame))`.Áúü“PM In the third situation, the decoder should use a method such as [`split_to`]ÁüäOL or [`advance`] to modify the buffer such that the frame is removed from theÁü´NK buffer, but any data in the buffer after that frame should still remain inÁüƒ OL the buffer. The decoder should also return `Ok(Some(the_decoded_frame))` inÁ this case.Áâ úüæ OL Finally the decoder may return an error if the data is invalid in some way.Áü¶!OL The decoder should _not_ return an error just because it has yet to receiveÁŒ†" a full frame.Á˜"úüœ"MJ It is guaranteed that, from one call to `decode` to another, the providedÁüê"OL buffer will contain the exact same data as before, except that if more dataÁüº#MJ has arrived through the IO resource, that data will have been appended toÁüˆ$FC the buffer. This means that reading frames from a `FramedRead` isÁüÏ$1. essentially equivalent to the following loop:Á%úl…%ž—ü“%  use tokio::io::AsyncReadExt;Áü´%C@ # // This uses async_stream to create an example that compiles.Áüø%ro # fn foo() -> impl futures_core::Stream<Item = std::io::Result<bytes::BytesMut>> { async_str
ö¬ÑÔë
ü©
= : Creates a new `BytesCodec` for shipping around raw bytes.Áò
ö¬ÐÐ
Ñܨ ö¬ÓÔÕåæçÕ ÒÒ£¯ ÒÒÃÂü O 4„  ö¬ £¯Ö¿Ù¿Ú¿«Û¿ˆÜ¿Ý¿Þ¿ˆ‚†f|Â
Û¼ݼÞ¼©ß¼à¼ÛἈcSñŸ«‡zÙ£¯ÃÂÒ Ò
Õ$ ìe üò
" ö¬×ØñòØT›  ÖÖÃÂü¸N  ˜ ö¬·® ˜£¯ç†Ö  Ö
Ø ç­ ìeÚ üÙ% ö¬ÚÛñòÛT…  ÙÙÃÂü¢Q  š ö¬£¯ š£¯ç†Ù ¬ Ù
Û ç­ ìeÇ ì‰cU\©c<­cÇäç4ÝÞù‡õL+|ÝàÂõT6¯Ýá­®DO¿Ýâ±Mb¦Ýã¤jLVXFH|H8<])Œâ
üg# Decoding of frames via buffers.ÁúüEB This trait is used when constructing an instance of [`Framed`] orÁüÕOL [`FramedRead`]. An implementation of `Decoder` takes a byte stream that hasÁü¥HE already been buffered in `src` and decodes the data into a stream ofÁÄî `Self::Item` frames.Áúü‹DA Implementations are able to track state on `self`, which enablesÁüÐMJ implementing stateful streaming parsers. In many cases, though, this typeÁüž=: will simply be a unit struct (e.g. `struct HttpDecoder`).ÁÜúüà=: For some underlying data-sources, namely files and FIFOs,Áüž>; it's possible to temporarily read 0 bytes by reaching EOF.ÁÝúüá?< In these cases `decode_eof` will be called until it signalsÁü¡>; fulfillment of all closing frames by returning `Ok(None)`.ÁüàOL After that, repeated attempts to read from the [`Framed`] or [`FramedRead`]Áü°JG will not invoke `decode` or `decode_eof` again, until data can be readÁœû during a retry.Áúü“DA It is up to the Decoder to keep track of a restart after an EOF,ÁüØ>; and to decide how to handle such an event by, for example,Áü— KH allowing frames to cross EOF boundaries, re-emitting opening frames, orÁüã (% resetting the entire internal state.ÁŒ
úü
$! [`Framed`]: crate::codec::FramedÁüµ
,) [`FramedRead`]: crate::codec::FramedReadÁ
ää³ìüâ
º4ä³ì³ì åæçèéåæçèéÍì»ìå È‹Íì»ìæä éï‹ÃÂç‹ÿ‹çèé üú
 The type of decoded frames.Á$£ ääÜ ü® 41 The type of unrecoverable frame decoding errors.Áç úüï EB If an individual message is ill-formed but can be ignored withoutÁü¹ FC interfering with the processing of future messages, it may be moreÁü„
.+ useful to report the failure as an `Item`.Á·
úü¿
LI `From<io::Error>` is required in the interest of making `Error` suitableÁüKH for returning directly from a [`FramedRead`], and to enable the defaultÁüàKH implementation of `decode_eof` to yield an `io::Error` when the decoderÁü°(% fails to consume all available data.ÁÝúüåJG Note that implementors of this trait can simply indicate `type Error =Áü´.+ io::Error` to use I/O errors as this type.Áçúüï,ĉääüŸ(TüÂA> Attempts to decode a frame from the provided buffer of bytes.ÁˆúüJG This method is called by [`FramedRead`] whenever bytes are ready to beÁüßHE parsed. The provided buffer of bytes is what's been read so far, andÁü¬IF this instance of `Decode` can determine whether an entire frame is inÁüú+( the buffer and is ready to be returned.Áªúü²IF If an entire frame is available, then this instance will remove thoseÁü€?< bytes from the buffer provided and return them as a decodedÁüÄKH frame. Note that removing bytes from the provided buffer doesn't alwaysÁü”KH necessarily copy the bytes, so this should be an efficient operation inÁ¼ä most circumstances.ÁúüˆHE If the bytes look valid, but a frame isn't fully available yet, thenÁüÕJG `Ok(None)` is returned. This indicates to the [`Framed`] instance thatÁü¤FC it needs to read some more bytes before calling this method again.Áïúü÷DA Note that the bytes provided may be empty. If a previous call toÁüÀGD `decode` consumed all the bytes in the buffer then `decode` will beÁüŒPM called again until it returns `Ok(None)`, indicating that more bytes need toÁ be read.ÁòúüúFC Finally, if the bytes in the buffer are malformed then an error isÁüÅKH returned indicating why. This informs [`Framed`] that the stream is nowÁü•%" corrupt and should be terminated.Á¿úüÇ$–‰üð,ĉ¡ú¼© # Buffer managementÁÅúüÍJG Before returning from the function, implementations should ensure thatÁüœJG the buffer has appropriate capacity in anticipation of future calls toÁüë52 `decode`. Failing to do so leads to inefficiency.Á¥úü­GD For example, if frames have a fixed length, or if the length of theÁüùFC current frame is known from a header, a possible buffer managementÁ„Ä 
strategy is:ÁÙ úž—”ó  # use std::io;Á,Š!Ô”! # use bytes::BytesMut;Áü³!%À¬,Ý!Ù¢¬ç! # struct MyCodec;Á,"Ù¢ô‹" impl Decoder for MyCodec {Át®" // ...ÁüÁ" # type Item = BytesMut;Áüå"! # type Error = io::Error;Á#úü“#]Z fn decode(&mut self, src: &mut BytesMut) -> Result<Option<Self::Item>, Self::Error> {Á”õ# // ...ÁŒ$úü”$HE // Reserve enough to complete decoding of the current frame.Áüá$<9 let current_frame_len: usize = 1000; // Example.Áü¢%41 // And to start decoding the next frame.ÁüÛ%>; let next_frame_header_len: usize = 10; // Example.Áüž&C@ src.reserve(current_frame_len + next_frame_header_len);Áæ&úäî& return Ok(None);ÁL'èÆ,'ÉŸ<§'ן³'úü»'EB An optimal buffer management strategy minimizes reallocations andÁ¬…( over-allocations.Á4¢(œ »ì œ£¯Ö¿Ù¿Ú¿«Û¿ˆÜ¿Ý¿Þ¿ˆ‚†f|Â
ôüÛ÷ôýY4î ôÿZLö£ô±M¦ôŒý„¾ô­¢¥‚ôk<¹Ìô·œØôô=ô(/¤M Lg|ù”¥éì½Ú\àÌμ¾<†¯l“ŸL¦Ž|~jlì‘„—ôäíTÿø²Í<k±¦ÉŠÜ4›ˆˆ£¯ü±'¬¼ˆˆÔÒÙ±Œ´Œ¤óÙ±
ŒÜà ø²Ž´Ž¤å ø²
Žü’ !Ù±ëüº % £¯Ù±
“14Æ üþ
"ø²ëü§%£¯ø²
“14³üÅ#®²¢ôï¡ ¡®² ¡Ù± ù
ü«&®²¥üØ*¢ ¢®² ¢Ù± æ
ü¤$®²˜¢˜üÏ£ £®² £ø² Ù
˜ü'®²š¥šü»+¤ ¤®² ¤ø² É
šü‰q¥œ¦£žžœÏç ŽÂë ÍìÜ´ ‹ÌäÒ°£Ü´Ù±¤å´Ÿ FG ]_bd^`L$†Ö¿Ù¿Ú¿«Û¿ˆÜ¿Ý¿Þ¿ˆ‚†f|Â
Ò°åÒ°æü­T¥¦§„¾„¾Œý†¾ ˜X$]È=„kt• ¥´ ¦ÌÌkÎÓ¸Ïíú¸Ð†û¸Ñ—û¸Ò¬û¸f'EwÚ]¾å§œØžØŸØÈ Øˆ¡Ø¢Ø´‰‰Nµý¤ÃÛ¼ݼÞ¼©ß¼à¼ÛἈcSñŸ«‡zÙ´F Ä
 ̰Ò°Ü´ùÒÐÔl,”@ š¢²¢Ï¢¢ ¢̰Ò°Ü´‹Ù‹Ù $”E š£²£Ï££ £̰Ò°Ü´·ÝÆÝ,¤L š¤²¤Ï¤¤ ¤̰Ò°Ü´ÃÂÃÂÆÝü¡U™¥¦š§¦¨¨©§¨¦©Ïç ¦UÍ캵 ©UÍì°± ¬UÍì´µ ¯U™ÚTßUï°±ºµTòUé°±ºµñÃÂ|ŒV£´µø²¬¤Vè´ª«¬­¯ 
¬¯­«¸º´°²¬®TÁV,ÆV¥¥ÔàüÝV^TàV¨©ª„¾„¾Œý†¾ ˜X$]È=„kt• ¨è´ ©ÌÌkÎÓ¸Ïíú¸Ð†û¸Ñ—û¸Ò¬û¸f'EwÚ]¾åªœØžØŸØÈ Øˆ¡Ø¢Ø´‰‰Nµý¤ÃÖ¿Ù¿Ú¿«Û¿ˆÜ¿Ý¿Þ¿ˆ‚†f|Â
è´ºµ ¥ ùV¥
«̰ºµ°±´µ$ïVùÒ…WüˆYGT‹Y«„¾„¾Œý†¾ ˜X$]È=„kt• «è´ºµ´ä¥  Y¥
¬̰ºµ°±´µ$–Y÷$¬YüöZZTùZ¬­®„¾„¾Œý†¾ ˜X$]È=„kt• ¬è´ ­ÌÌkÎÓ¸Ïíú¸Ð†û¸Ñ—û¸Ò¬û¸f'EwÚ]¾å®ï㥠Ž[¥
­̰ºµ°±´µ$„[ùÒš[Üß[tì[ü£b^T¦b¯°±„¾„¾Œý†¾ ˜X$]È=„kt• ¯è´ °ÌÌkÎÓ¸Ïíú¸Ð†û¸Ñ—û¸Ò¬û¸f'EwÚ]¾å±ï㥠¿b¥
¯̰ºµ°±´µ$µbùÒËbŒ¾d<
<ù;ü;ë;î;Ý;à;Te4…eǪã.<äµÐ/<?ïµ·¨Thªµ¹ÙLDt¥µº‚LL~žµ»1T‰ˆµ¼סEµ½‡õ|µ¿Âõ¯µÀ­®¿µÁÀä$
µÂÛ÷\µÃ׳¤,µÄ±MÁ¦µÅŒýÓ„¾µÆk<è̵ȷœØµÉôgô(YÌLJM<?.1 #¤› ÷ù|Þé”óÙì‹ÊD®»<¼¬lÉœLÜ{}¼—
¥Ë¦ÌÌËÏç œ
Âë Ÿ
‘¶ÍÎÏÐÑÒÓÔÕØÙÚÛÜÝÞßàFHKMü.üµ
P̶üŠQN I/O object, using [`Decoder`] and [`Encoder`] to read and write the raw data.ÁàúüèK¢€ü¸F–¸üƒEB method layers framing on top of an I/O object, by using the codecÁüÍH·¹üš:‰ºÙúüáGD This function returns a *single* object that is both [`Stream`] andÁü­MJ [`Sink`]; grouping this into a single object is often useful for layeringÁüÿLý»´ÐÒ¼ëúüóIþ¼üÁIF calling [`split`] on the `Framed` returned by this method, which willÁüL¤¾àúüèLI Note that, for some byte sources, the stream can be resumed after an EOFÁü¹LI by reading from it, even after it has returned `None`. Repeated attemptsÁüŠKH to do so, without new data available, continue to return `None` withoutÁüÚ# creating more (closing) frames.ÁúüŠ$˜ìü³ ÆìüØ%" [`Decode`]: crate::codec::DecoderÁü‚&# [`Encoder`]: crate::codec::EncoderÁü­[X [`split`]: https://docs.rs/futures/0.3/futures/stream/trait.StreamExt.html#method.splitÁ̰Ò°‘¶ÊÊ
Ḭ́Ò°ÇŽ-,¢üØ&IüìP̶üÁQN I/O object, using [`Decoder`] and [`Encoder`] to read and write the raw data,Áü—1. with a specific read buffer initial capacity.ÁÍúüÕK¢€ü¥F–¸üðE‡ñüºH·¹ü‡ :‰ºÆ úüÎ Gþñüš!MÏòüì!Lý»´½"Ò¼Ø"úüà"Iþ¼ü®#IÛóüü#L¤¾Í$úüÕ$$˜ìüþ$ Æìü£%%ž÷üÍ%&Í÷üø%[ý÷lß&̰Ò°‘¶ÊÊ
Ḭ̂Ò°Ç,í&Ž-,÷&°~D'ü¹8;ü“,P̶üè,Q„ð¾-úüÆ-K¢€ü–.F–¸üá.Gæ¸ü­/H·¹üú/:‰º¹0úüÁ0Gþñü1MÏòüß1Lý»´°2Ò¼Ë2úüÓ2SP This objects takes a stream and a `readbuffer` and a `writebuffer`. These fieldÁü«3MJ can be obtained from an existing `Framed` with the [`into_parts`] method.Áý3úü…4Iþ¼üÓ4IÛóü¡5L¤¾ò5úüú5$˜ìü£6 ÆìüÈ6&# [`Decoder`]: crate::codec::DecoderÁüó6&Í÷üž763 [`into_parts`]: crate::codec::Framed::into_parts()ÁüÙ7[ý÷TÀ8¥·‘¶ÊÊ
Ḭ̈Ò°partsÁ,Ë8ܾ=üª;?< Returns a reference to the underlying I/O stream wrapped byÁlî;
`Framed`.Á€<úüˆ<KH Note that care should be taken to not tamper with the underlying streamÁüØ<FC of data coming in as it may corrupt the stream of frames otherwiseÁ´£= being worked with.Á<Å=² ²‘¶ ²̰Ê Í=Ê
Ð̰Ò°$Î=ü@#ü>GD Returns a mutable reference to the underlying I/O stream wrapped byÁlÍ>уß>úüç>Kôƒü·?FÉ„´‚@˜…<¤@³ ³‘¶ ³̰Ê ¬@Ê
Ñ̰Ò°$±@üC7üì@NK Returns a pinned mutable reference to the underlying I/O stream wrapped byÁl¿AуÑAúüÙAKôƒü©BFÉ„´ôB˜…\–C´„¾„¾Œý†¾ ˜X$]È=„kt• ´‘¶„¾„¾Œý†¾ ˜X$]È=„kt• ´̰Ê ¬CÊ
Ò̰Ò°$¢CÌõEüD:7 Returns a reference to the underlying codec wrapped byÁlÀDуÒDúüÚDJG Note that care should be taken to not tamper with the underlying codecÁü©EGD as it may corrupt the stream of frames otherwise being worked with.Á,üEµ µ‘¶ µÒ°Ê ‚FÊ
Ó̰Ò°$ƒFü²H%ü¶FB? Returns a mutable reference to the underlying codec wrapped byÁlýFуGúü—GJà‹üæGG´ŒL¹H ‘¶ Ò°Ê ÃHÊ
Ô̰Ò°$ÈHüŒKYüƒIDA Maps the codec `U` to `C`, preserving the read and write buffersÁÄÌI wrapped by `Framed`.ÁéIúüñIJà‹üÀJG´ŒL“K‘¶êçǵ
@nð›î?̰ÊÖ×Ö×ÊÍì»’ Käë  K–"êÒ°tÖKꔓ˜"»’ ãK
Õ̰Ò°»’ê$£KØ©K]_bdüÈP4üÌNBîl“Oу¥Oúü­OJà‹üüOG´ŒlÏP·„¾„¾Œý†¾ ˜X$]È=„kt• ·‘¶ ·Ò°Ê çPÊ
Ø̰Ò°$ÝPüçQ&ü·Q+( Returns a reference to the read buffer.Á\îQ¸ ¸‘¶ ¸£¯Ê úQÊ
Ṵ̀Ò°$ûQüùR2üÁR30 Returns a mutable reference to the read buffer.Á|€S¹ ¹‘¶ ¹£¯Ê SÊ
Ṵ́Ò°$•Sü”T'üãS,) Returns a reference to the write buffer.ÁdTº º‘¶ º£¯Ê ¨TÊ
Ṵ̂Ò°$©Tü©U3üðT41 Returns a mutable reference to the write buffer.Á„°U» »‘¶ »£¯Ê ÁUÊ
Ṵ̈Ò°$ÆUü»V,ü•V! Returns backpressure boundaryÁ¬ÂV¼ ¼‘¶Ê ØVÊ
Ý̰Ò°$ÙVüÐW<üªW! Updates backpressure boundaryÁÌ×W½ ½‘¶Ê ñWÊ
Þ̰Ò°$öWboundaryÁDüWäÝZüÛX?< Consumes the `Framed`, returning its underlying I/O stream.ÁŸYúü§YKôƒü÷YFÉ„´ÂZ˜…TäZ‘¶̰ÊÊ
ß̰Ò°$ïZüÛ],ü [JG Consumes the `Framed`, returning its underlying I/O stream, the bufferÁüï[)& with unprocessed data, and the codec.Á\úü¥\Kôƒüõ\FÉ„´À]˜…Tâ]‘¶¥·ÊÊ
à̰Ò°$í]ü±`J¥â¦ãâãÏç ¶`Âë ¹`‹ÌLá`½×<ó`‘¶äåFGå0257La$‡aáá²Øü®aTL±a¾¿À„¾„¾Œý†¾ ˜X$]È=„kt• ¾‘¶ ¿ÌÌkÎÓ¸Ïíú¸Ð†û¸Ñ—û¸Ò¬û¸f'EwÚ]¾åÀœØžØŸØÈ Øˆ¡Ø¢Ø´‰‰Nµý¤ÃÛ¼ݼÞ¼©ß¼à¼ÛἈ
 `£cìe `àB¤GS
Íé¢ï  iï
ò̰Ò°$¡i± §iäðp¥ô¦õôõÏç õpÂë øp¥·öüÀqTü“q(% Create a new, default, `FramedParts`ÁÇq̰Ò°¥·óš÷÷óÍìš ËqïÒ°δT‰r
ö̰Ò°δ±MÎqŽ-,Õq9;d•e|``p`s`|»e\¿eÇØÜ¨T ªûý‚LL,žûþã.<Jäûÿëס4fEû‡õL}|û­®D”¿ûÀä
ûƒÛ÷û×â¤,ûŒýõ„¾ûk<ŠÌûˆ·$“œØûŽM\¦ªûŠúÌ ¬<¤Xí¤rÞ|Д¢À캱DÝ¢lë’Lþƒqs”ŸcÜ쥌ŒÏç ñÍ섹 ôѸŽšœ@B<>üË 4üŽ 85 Creates a new `FramedRead` with the given `decoder`.ÁÒ ̰„¹Ѹ
Ž̰„¹Ç¶.<à üª Oü½ RO Creates a new `FramedRead` with the given `decoder` and a buffer of `capacity`ÁŒ”  initial size.Ál± ̰„¹Ѹ
̰„¹Ç,¿ ¶.<É °~DÕ ܉üñ?‰ƒŒµ `FramedRead`.ÁËúüÓKôƒü£FÉ„´î˜…<Î ÎѸ Ḭ̂ ˜
̰„¹$™üì#üÌG¡†Œ˜¼»®úü¶Kôƒü†FÉ„´Ñ˜…Ï ÏѸ Ḭ̈ û
̰„¹$€üâ7ü»NˆŒŽ¼»¤úü¬KôƒüüFÉ„´Ç˜…Є¾„¾Œý†¾ ˜X$]È=„kt• ÐѸ„¾„¾Œý†¾ ˜X$]È=„kt• Ð̰ ÿ
̰„¹äÚüÔC@ Consumes the `FramedRead`, returning its underlying I/O stream.Áœúü¤KôƒüôFÉ„´¿˜…Ѹ̰
̰„¹ÜÔü2/ Returns a reference to the underlying decoder.Á<ÛÑ ÑѸ Ñ„¹ ã
̰„¹üÖ'ü—:7 Returns a mutable reference to the underlying decoder.Á\ÝÒ ÒѸ Ò„¹ é
̰„¹ü†_ü©;8 Maps the decoder `D` to `C`, preserving the read bufferÁÄé¥\ѸêØØ¢‹ÛÇûõ]´']X#̰»’˜˜ð’ äë œ–"ꄹêÕǘ"»’ ã
̰„¹»’êØ¥]_bdü•"6üÖ!:¼Ã|œ"Ó„¾„¾Œý†¾ ˜X$]È=„kt• ÓѸ Ó„¹ ¶"
̰„¹$¬"ü¶#&ü†#+á”\½#Ô ÔѸ Ô£¯ É#
š̰„¹$Ê#üÃ$2ü‹$3ÿ•|Ê$Õ ÕѸ Õ£¯ Ú$
̰„¹$ß$ü©&,ü¨%NK Consumes the `FramedRead`, returning its underlying I/O stream, the bufferÁüû%)¬žT°&ѸªªŽM­±M®Ž-¯ÃM°ÓM±Ò@<za˜›5&L̰„¹
œ̰„¹$»&üì(N¥žŸŸžÏç ñ(Ù¸ ô(‹ÌL )䄹<²)Ѹ ¡FG¡8:=?LÁ)$Æ)Ö¿Ù¿Ú¿«Û¿ˆÜ¿Ý¿Þ¿ˆ‚†f|Â
„¹å„¹æüí)TLð)Öר„¾„¾Œý†¾ ˜X$]È=„kt• ÖѸ ×ÌÌkÎÓ¸Ïíú¸Ð†û¸Ñ—û¸Ò¬û¸f'EwÚ]¾å؜؞؟ØÈ Øˆ¡Ø¢Ø´‰‰Nµý¤ÃÛ¼ݼÞ¼©ß¼à¼ÛἈcSñŸ«‡zÙѸF „*
¡̰„¹$ú)ùÒ*ü«+@¥£š¤¥£¤¥Ïç °+þß ³+Í칸 ¶+
̰ºµ<ã+𹦧¨©ª 
¨©§ªbdgiceTò+,÷+¢¢̰ºµ üŽ,ZT‘,ÙÚÛ„¾„¾Œý†¾ ˜X$]È=„kt• Ùš¹ ÚÌÌkÎÓ¸Ïíú¸Ð†û¸Ñ—û¸Ò¬û¸f'EwÚ]¾åۜ؞؟ØÈ Øˆ¡Ø¢Ø´‰‰Nµý¤ÃÖ¿Ù¿Ú¿«Û¿ˆÜ¿Ý¿Þ¿ˆ‚†f|Â
š¹ºµ ¢ ¦,¢
§̰ºµ¹¸$œ,ùÒ²,ü²-GTµ-Ü„¾„¾Œý†¾ ˜X$]È=„kt• Üš¹ºµ£×¢ Ê-¢
¨̰ºµ¹¸$À-÷$Ö-üÅ.ZTÈ.ÝÞß„¾„¾Œý†¾ ˜X$]È=„kt• Ýš¹ ÞÌÌkÎÓ¸Ïíú¸Ð†û¸Ñ—û¸Ò¬û¸f'EwÚ]¾åßÞÖ¢ Ý.¢
©̰ºµ¹¸$Ó.ùÒé.üé/ZTì/àáℾ„¾Œý†¾ ˜X$]È=„kt• àš¹ áÌÌkÎÓ¸Ïíú¸Ð†û¸Ñ—û¸Ò¬û¸f'EwÚ]¾åâÞÖ¢ 0¢
ª̰ºµ¹¸$÷/ùÒ0ü‹1V¥¬­¬­Ïç 1Ù¸ “1ÎìTÃ1¿c„¹TÖ1Ѹ®Àc®358:üè18ë1ãäå ãѸ ä c cˆ¢cµ
 `£cìe `àB¤GS
å颫 ï1«
®̰„¹$ð1± ö1ìÔe v„ôedøeǯ³Ð/<ï°±¨TDª°³1TPˆ°´ס4pE°µÂõT‡¯°­®¿°·Àä
°¸Û÷°¹×í¤,°º±Mû¦°»Œý„¾°¼k<¢Ì°¾·œØ°¿ŽM\¾ª°Àúô-Ì(!¤b¬|ö|˜æ”­ÖìÅÇDè¸<ö©lƒ™L–ŠŒxz”·j以ÂÃÃÂÏç ÀÍìæº óºÄÅÆÇÈÉÊËÌÏÐÑÒÓÔFHBDüœ 5üÞ96 Creates a new `FramedWrite` with the given `encoder`.Á£ ̰溳ºÁÁ
Ä̰æºÇ·/<± ü Pü“ SP Creates a new `FramedWrite` with the given `encoder` and a buffer of `capacity`ÁŒë ³º ̰溳ºÁÁ
Å̰æºÇ,– ·/<  °~D¬ Ü©ü?‰ƒ”Ô `FramedWrite`.ÁëúüóKôƒüÃFÉ„´Ž˜…æ æ³º æ̰Á ¸Á
Æ̰æºü#üìG¡†”¸‘çÏúü×Kôƒü§FÉ„´ò˜…<”ç 糺 ç̰Á œÁ
Ç̰æºü„7üÜNˆ”¯‘çÆúüÎKôƒüžFÉ„´é˜…\‹è„¾„¾Œý†¾ ˜X$]È=„kt• 賺„¾„¾Œý†¾ ˜X$]È=„kt• ḛ̀Á ¡Á
Ḛ̀æº$—äýüöDA Consumes the `FramedWrite`, returning its underlying I/O stream.Á¿úüÇKôƒü—FÉ„´â˜…T„³º̰ÁÁ
Ḛ́æº$Ü÷üÀ2/ Returns a reference to the underlying encoder.Á<þé 鳺 éæºÁ Á
Ḛ̂æº$‡üù'üº:7 Returns a mutable reference to the underlying encoder.Á\€ê 곺 êæºÁ ŒÁ
Ḛ̈æº$‘üª`üÌ<9 Maps the encoder `E` to `C`, preserving the write bufferÁÄ¥³ºê¯¯܈²Ç°@@r·%̰»’ÁÍÎÎÍÁð’ ½äë À–"êæºê­ó˜"»’ ˆ
Ḭ̀溻’êØÉ]_bdü»!6üü :“ï|Â!넾„¾Œý†¾ ˜X$]È=„kt• 볺 ëæºÁ Ü!Á
Ḭ̈æº$Ò!üÝ"'ü¬",¥—dä"ì 쳺 죯Á ñ"Á
Ð̰æº$ò"üì#3ü³#4Ę„ó#í í³º í£¯Á „$Á
Ñ̰æº$‰$üø$,üÒ$!뙬ÿ$î Á •%Á
Ò̰æº$%ü‡&<üá%!ôšÌŽ&ï ﳺÁ ¨&Á
Ó̰æº$­&ñ›D³&üŽ(,üŒ'OL Consumes the `FramedWrite`, returning its underlying I/O stream, the bufferÁüà')¬žT•(³ºªªŽM­±M®Ž-¯ÃM°ÓM±Ò@<za˜›5&L̰æºÁÁ
Ô̰æº$ (üÑ*v¥Öš×ØÖרÏç Ö*þß Ù*Í웺 Ü*™ÚTŠ+ºµT+雺ºµñÃÂ|·+òºÙÚÛÜÝ 
ÛÝÜÚŠŒTÎ+,Ó+ÕÕüüê+ZTí+ðñò„¾„¾Œý†¾ ˜X$]È=„kt• ðòº ñÌÌkÎÓ¸Ïíú¸Ð†û¸Ñ—û¸Ò¬û¸f'EwÚ]¾åòœØžØŸØÈ Øˆ¡Ø¢Ø´‰‰Nµý¤ÃÖ¿Ù¿Ú¿«Û¿ˆÜ¿Ý¿Þ¿ˆ‚†f|Â
òººµ Õ ‚,Õ
Ṵ́ºµ›º$ø+ùÒŽ,üþ,GT-󄾄¾Œý†¾ ˜X$]È=„kt• óòººµÍÿÕ –-Õ
Ṵ̂ºµ›º$Œ-÷$¢-ü
 `£cìe `àB¤GS
ÿé¢ã ¹3ã
æ̰Ò°$º3± À3üŽf}ŒÄ°fü4
1 Frame a stream of bytes based on a length prefixÁ5
úü9F
C Many protocols delimit their frames by prefacing frame data with aÁü€:
7 frame head that specifies the length of the frame. TheÁü»H
E `length_delimited` module provides utilities for handling the lengthÁü„F
C based framing. This allows the consumer to work with entire framesÁüËC
@ without having to worry about buffering or other framing logic.Á
ú¬“
 # Getting startedÁ©
úü­K
H If implementing a protocol from scratch, using length delimited framingÁüùG
D is an easy way to get started. [`LengthDelimitedCodec::new()`] willÁüÁG
D return a length delimited codec using default configuration values.Áü‰F
C This can then be used to construct a framer to adapt a full-duplexÁüÐ(
% byte stream into a stream of frames.Áù
ú
ןü…+
( use tokio::io::{AsyncRead, AsyncWrite};Áü±:
7 use tokio_util::codec::{Framed, LengthDelimitedCodec};Áì
úüð7
4 fn bind_transport<T: AsyncRead + AsyncWrite>(io: T)矬*
' -> Framed<T, LengthDelimitedCodec>Á
üÙ4
1 Framed::new(io, LengthDelimitedCodec::new())Á
ÉŸ´”
 # pub fn main() {}Á
ן³
úü·H
E The returned transport implements `Sink + Stream` for `BytesMut`. ItÁü€ G
D encodes the frame with a big-endian `u32` header denoting the frameÁœÈ
 payload length:ÁÜ
ú
 ```textÁüì 1
. +----------+--------------------------------+Áüž
1
. | len: u32 | frame payload |ÁüÐ
1
å˜ <
ןŠ
úüŽ &
# Specifically, given the following:Áµ
ú
ןüÁ +
û“ üí :
°” ¨
ú̬
 use futures::SinkExt;Á¬Æ
 use bytes::Bytes;ÁÜ
úüà L
I async fn write_frame<T>(io: T) -> Result<(), Box<dyn std::error::Error>>ÁL­
 whereÁü·
*
' T: AsyncRead + AsyncWrite + Unpin,Á
ô• üè
I
F let mut transport = Framed::new(io, LengthDelimitedCodec::new());Áü²/
, let frame = Bytes::from("hello world");Áâ
úüæ%
" transport.send(frame).await?;Á
äÔ,
ÉŸ
ן©
úü­*
' The encoded frame will look like this:ÁØ
ú
И üè'
$ +---- len: u32 ----+---- data ----+Áü'
$ | \x00\x00\x00\x0b | hello world |Áü¸'
$ +------------------+--------------+Á
ןè
ú
# DecodingÁû
úüÿK
H [`FramedRead`] adapts an [`AsyncRead`] into a `Stream` of [`BytesMut`],ÁüËI
F such that each yielded [`BytesMut`] value contains the contents of an知B
? entire frame. There are many configuration parameters enabling矯E
B [`FramedRead`] to handle a wide range of protocols. Here are someÁüžA
> examples that will cover the various options at a high level.Áà
ú„ä
## Example 1Áõ
úüùK
H The following will parse a `u16` length field at offset 0, omitting the矁)
& frame head in the yielded `BytesMut`.Áï
ú
ןüû"
 # use tokio_stream::StreamExt;Áüž2
/ # use tokio_util::codec::LengthDelimitedCodec;矄/
×Á¼
‚ˆü™-
* # let io: &[u8] = b"\x00\x0BHello world";矂4
1 let mut reader = LengthDelimitedCodec::builder()Áüü0
- .length_field_offset(0) // default valueÁü­#
.length_field_type::<u16>()矄0
- .length_adjustment(0) // default valueÁ´‚
 .new_read(io);Áü™?
< # let res = reader.next().await.unwrap().unwrap().to_vec();ÁüÙ&
# # assert_eq!(res, b"Hello world");Á<€
±È<ˆ
ן
úü”0
- The following frame will be decoded as such:ÁÅ
ú
И üÕ1
. INPUT DECODEDÁü‡6
3 +-- len ---+--- Payload ---+ +--- Payload ---+Áü¾6
3 | \x00\x0B | Hello world | --> | Hello world |Áüõ6
3 +----------+---------------+ +---------------+Á
ן´
úü¸L
I The value of the length field is 11 (`\x0B`) which represents the lengthÁü…J
G of the payload, `hello world`. By default, [`FramedRead`] assumes thatÁüÐH
E the length field represents the number of bytes that **follows** the矪L
I length field. Thus, the entire frame has a length of 13: 2 bytes for theÁüæ*
' frame head + 11 bytes for the payload.Á
ú„•
## Example 2Á¦
úüªL
I The following will parse a `u16` length field at offset 0, including theÁü÷)
’¥ ¡
ú
ןü­"
Þ¥ üÐ2
Ц üƒ /
×Á¼³
‚ˆüË -
ᦠüù 4
˜§ ü®!0
Ö§ üß!#
¨ üƒ":
7 .length_adjustment(2) // Add head size to lengthÁü¾"7
4 .num_skip(0) // Do NOT skip the headÁ´ö"
ö¨ ü#?
–© üÍ#.
+ # assert_eq!(res, b"\x00\x0BHello world");Á<ü#
±È<„$
ןŒ$
úü$0
µª Á$
ú\Å$
И üÑ$4
1 INPUT DECODED矠%A
> +-- len ---+--- Payload ---+ +-- len ---+--- Payload ---+ÁüÈ%A
> | \x00\x0B | Hello world | --> | \x00\x0B | Hello world |ÁüŠ&A
> +----------+---------------+ +----------+---------------+Á<Ì&
ןÔ&
úüØ&I
F This is similar to the first example, the only difference is that the矢'J
G frame head is **included** in the yielded `BytesMut` value. To achieveÁüí'P
M this, we need to add the header size to the length with `length_adjustment`,Áü¾(;
8 and set `num_skip` to `0` to prevent skipping the head.Á
included.Á•C
ú<™C
ןü¡C"
Þ¥ üÄC2
Ц ü÷C/
×Á¼§D
‚ˆü¿D5
2 # let io: &[u8] = b"\xCA\x00\x0B\xFEHello world";ÁüõD4
˜§ üªE1
. .length_field_offset(1) // length of hdr1矆E#
¨ ü€F0
- .length_adjustment(1) // length of hdr2Áü±F,
) .num_skip(3) // length of hdr1 + LENÁ´ÞF
ö¨ üõF?
–© üµG*
' # assert_eq!(res, b"\xFEHello world");Á<àG
±È<èG
ןðG
úüôG0
µª ¥H
ú\©H
И ԵH
çÇ üÐH2
/ +- hdr1 -+-- len ---+- hdr2 -+--- Payload ---+ÁüƒI2
/ | \xCA | \x00\x0B | \xFE | Hello world |Áü¶I2
/ +--------+----------+--------+---------------+ÁéI
ú¤íI
 DECODEDÁô‚J
 +- hdr2 -+--- Payload ---+Áô¡J
 | \xFE | Hello world |ÁôÀJ
 +--------+---------------+Á<ßJ
ןçJ
úüëJI
F The length field is situated in the middle of the frame head. In thisÁüµKK
H case, the first byte in the frame head could be a version or some otherÁüLH
E identifier that is not needed for processing. On the other hand, theÁüÊL&
# second half of the head is needed.ÁñL
úüõLJ
G `length_field_offset` indicates how many bytes to skip before startingÁüÀML
I to read the length field. `length_adjustment` is the number of bytes toÁüNI
F skip starting at the end of the length field. In this case, it is theÁä×N
 second half of the head.ÁôN
ú„øN
## Example 6Á‰O
úüOI
ëÎ ü×OL
¾Ï ü¤PJ
”Ð üïPH
E included. In this case, the length field **includes** the frame headÁ\¸Q
 length.ÁÄQ
ú<ÈQ
ןüÐQ"
Þ¥ üóQ2
Ц ü¦R/
×Á¼ÖR
‚ˆüîR5
2 # let io: &[u8] = b"\xCA\x00\x0F\xFEHello world";Áü¤S4
˜§ üÙS1
›Ò ü‹T#
¨ ü¯TA
> .length_adjustment(-3) // length of hdr1 + LEN, negativeÁ¤ñT
 .num_skip(3)Á´†U
ö¨ üU?
–© üÝU*
ïÓ <ˆV
±È<V
ן˜V
úüœV0
µª ÍV
ú\ÑV
И ÔÝV
çÇ üøV2
ýÔ ü«W2
/ | \xCA | \x00\x0F | \xFE | Hello world |ÁüÞW2
õÕ X
ú¤•X
¼Ö ôªX
ÙÖ ôÉX
€× ôèX
§× <‡Y
ןY
úü“YI
F Similar to the example above, the difference is that the length fieldÁüÝYJ
G represents the length of the entire frame instead of just the payload.矬ZJ
G The length of `hdr1` and `len` must be counted in `length_adjustment`.ÁüóZI
F Note that the length of `hdr2` does **not** need to be explicitly setÁü½[L
I anywhere because it already is factored into the total frame length thatÁüŠ\!
 is read from the byte stream.Á¬\
ú„°\
## Example 7ÁÁ\
úüÅ\J
G The following will parse a 3 byte length field at offset 0 in a 4 byteÁü]C
@ frame head, excluding the 4th byte from the yielded `BytesMut`.ÁÔ]
ú<Ø]
ןüà]"
Þ¥ üƒ^2
Ц ü¶^/
×Á¼æ^
‚ˆüþ^5
2 # let io: &[u8] = b"\x00\x00\x0B\xFFHello world";Áü´_4
˜§ üé_0
Ö§ üš`
ªÅ üº`/
, .length_adjustment(0) // default valueÁüê`.
+ .num_skip(4) // skip the first 4 bytesÁ´™a
ö¨ ü°a?
–© üða&
ß© <—b
±È<Ÿb
ן§b