Files
boc/aamos-ledger-rust/target/debug/deps/libmio-3545320490828222.rmeta
T

1311 lines
388 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Áæ\‹±ÔcdùÀTƒ-f86f80b348d33b13ÁhermitÁ4™úwasiÁ$‡úŠ”òââŽAsRawFdÁ<Áú FromRawFdÁLÊúî RawFdÁ,Õúî:ô,‚úî¤Òþ¸úþÖúî¸úÖúî£
SocketAddrExtÁl9úandroidÁ¬£testsÁ,þ%$ó%set_nonblockingÁ|ƒŒúaixÁŒ©‹úillumosÁ¬¼‹úsolarisÁ¬Ó‹úvitaÁ”ê‹ü¨‹U[shellÁ,»os-pollÁ˜¿¨¿ƒð¸ úî¤ì ð AsRawSocketÁ\Ï â ªAsFdÁ$Ø
ú
ª¸
úîª
BorrowedFdÁTç
úî6Ö
úîK IntoRawFdÁLþ
úîiOwnedFdÁ<‰
úô,’
úîšœªí 
â< 
ªAsSocketÁD×
âªBorrowedSocketÁtá
â<
FromRawSocketÁlñ
â[
IntoRawSocketÁl€
âz OwnedSocketÁ\
♪ RawSocketÁLœ
â²´çŒ  úî¤ö ç¸ úîç¼  úî,Ö úîAð  úîVŽ
 úîkô úî‚çí \™ â çÓ
 âçí
 â& â8¬ âJË â\è ânŒ  ú Ǹ úîǼ  úî,Ö úîAð L€ úîVŽ
< úîkô,” úî‚Çí  â ÇÓ
 âÇí
 â& â8¬l‚ âJË\‘ â\è ânpÀmacrosÁ cfg_os_pollÁcfg_not_os_pollÁ
cfg_os_extÁcfg_netÁ
cfg_io_sourceÁcfg_any_os_extÁtraceÁÕerrorÁlogÁinterestÁREADABLEÁWRITABLEÁAIOÁLIOÁPRIORITYÁ³removeÁ is_readableÁ is_writableÁis_aioÁis_lioÁ is_priorityÁ#°#±&²(׊ ********** *
* * *
******·>registryÁ*RegistryÁ@selectorÁ@ has_wakerÁ*CÁCŠ *F as_raw_fdÁ*H×*JregisterÁK¤J
reregisterÁM¤J
deregisterÁO¤J try_cloneÁQ Jregister_wakerÁJß*U×*Was_fdÁ*YsysÁtokenÁ\]÷wakerÁ______eæ f ewakeÁeventÁiªjjjjjoÙoïoois_errorÁois_read_closedÁois_write_closedÁo­oo ofrom_sys_event_refÁjz×{ EventDetailsÁ|
|'aÁ|ˆ{×ieventsÁEventsÁinnerÁˆ
with_capacityÁˆcapacityÁˆis_emptyÁˆùˆclearÁˆÏðIntoIterÁêðó  size_hintÁüš×isourceÁœœœœœœÜ¢³¢É¢áœ¦¥¦³¦É¦áiiiiiú·pipeÁ¸¸¸¸·featuresÁguideÁInterestÁÀ
ÀˆÅÇÖ Êƒ
Ìï
 ÎCæ Ð [ debug_detailÁ[úÓsyscallÁ[ÓßÖÖÖÖÖÖÖÖÖÖ Ö
Ö Ö Ö
ÖÖÖÖÖÖÖÖNEXT_IDÁÖíæ íùï íselectÁñ ñ í³ô Öö¸ÖøÖinterests_to_epollÁÖEventÁÖ©ÖªýýýýÙýïýýæýõýŠý­ýý ý
debug_detailsÁŠ check_eventsÁÖÓÓðŽŽŽŽŽŽŽŽŽŽ Ž
Ž Ž Žœæ œnew_unregisteredÁœŸŸ œ
ack_and_resetÁœfdÁœwokenÁœresetÁ¤ ަÓsourcefdÁ¨¨¨¨¨¨¨¨°ð°³°É°áÓÓ­new_rawÁ¹ ¹ ÖÖSelectorÁ½idÁ½epÁÖÀ×íÉ íáÄ ÖÆ‡'Š
EventsDetailsÁÈ
ȈŠË×Östateless_io_sourceÁÍÍÍÍÍÍÍ
IoSourceStateÁÔ
ÍÖæ Ödo_ioÁØ¥ØØ£Ö³ÖÉÖáÖŽWakerÁà´%ŽâרSourceFdÁä
äð䈨èðè×ÓnetÁëëëëëëëëë
new_ip_socketÁë
new_socketÁëSocketAddrCReprÁöv4Áöv6Áëùas_ptrÁë socket_addrÁû ëto_socket_addrÁÓtcpÁþþþþþþþþþþ þ
þ þ þ
þ new_for_addrÁþbindÁþconnectÁþlistenÁþ
set_reuseaddrÁþacceptÁ  ÓudpÁ 
§,only_v6ÁÓudsÁ£££££££££datagramÁ¬¬¬¬¬¬¬¬¬¬ bind_addrÁ¬unboundÁ¬pairÁ£listenerÁ¹¹¹¹¹¹¹¹¹¹ ¹
¹ ¹ ¹
¹¹¹¹Æ.¹å,Ì £streamÁÎÎÎÎÎÎÎÎ connect_addrÁÎæ.£UNNAMED_ADDRESSÁ£ path_offsetÁ£ unix_addrÁ£æ.Û¥Û  
  
æ ö¿
ötry_ioÁøø¥ø ü³üÉüáwriteÁ write_vectoredÁƒ flushÁ Ö2ˆ è2Š ƒ3Œ Ž÷ from_raw_fdÁ into_raw_fdÁ÷ ˜¸
š÷ œ¿
œ‘2žž¥ž  ¢³¢É¢á
¦readÁ§ ¦
read_vectoredÁ© «þ4¬ «5® °÷²÷´ø3¸Ó3º÷¼¸¾÷¿
SenderÁÁ·Ã×ReceiverÁÅ·Ç×\TokenÁÉ
Ɉ\\\΃\Ð×\\Ó\ÕÖ\×ï
\ Ù\
Û§Üù_ )Þ·_à×jý"â·jäƒIterÁæðæ·æposÁêðê×íðíƒ io_sourceÁðððððððððð ð
ð ð ð
ðððIoSourceÁ¥º· selector_idÁð¥æ Þ(£
into_innerÁð¥å´ð¥ð¥³Éáð¥×ðœ UNASSOCIATEDÁœæ œ associateÁœcheck_associationÁœremove_associationÁð¢ƒð
SelectorIdÁ¤‡'ð¦×ü)¨Â+©ò.ªªªªªªªªªª ª
ª ª ª
ªªªªªªªªªªªªªª TcpListenerÁÆ·ªÈ§,Èfrom_stdÁÈå,Ë Ì È
local_addrÁÈset_ttlÁÈttlÁÈ
take_errorÁªÒ³ÒÉÒáªÖ×ªØø3ªÚªÜÓ3ªÞ÷ªà¸ªâ÷ª ä÷©©ì/çççççççççç ç
ç ç ç
ççççççççççççççç TcpStreamÁ·ç³,­> peer_addrÁÏ>shutdownÁ set_nodelayÁnodelayÁá>ð>û>peekÁ ‘2¥ çþ4˜ 5š çœþ4 œ5Ÿ ç¡Ö2¢ ¡è2¤ ¡ƒ3¦ ç¨Ö2© ¨è2« ¨ƒ3­ 篳¯É¯áç³×çµø3ç·ç ¹Ó3ç
»÷ç ½¸ç ¿÷ç
Á÷©¨¨¨¨ý,ÇÇÇÇÇÇÇÇÇÇ Ç
Ç Ç Ç
ÇÇÇÇÇÇÇÇÇÇ UdpSocketÁß·Çá§,á­>áÏ>áÙAásend_toÁæ á recv_fromÁè á peek_fromÁê ásendÁì árecvÁî á¼Bð á³,á
set_broadcastÁá broadcastÁáset_multicast_loop_v4Áámulticast_loop_v4Ááset_multicast_ttl_v4Áámulticast_ttl_v4Ááset_multicast_loop_v6Áámulticast_loop_v6Ááá>áð>ájoin_multicast_v4Áájoin_multicast_v6Ááleave_multicast_v4Ááleave_multicast_v6ÁáÇ-áû>á‘2ƒƒ¥ƒ dzÉáÇ×Çø3ÇÇÓ3Ç÷ǸÇ÷Ç ÷¨¨Ö-œ‰. 
  
 UnixDatagramÁµ··§,¸¡·Æ.·­>·³,¼¡·×.·æ.¿ ·Ï>·ÙA·æFà ·£GÅ ·ÒFÇ¡Ç ·’GÊ ·û>·òA·‘2ÎΥΠҳÒÉÒáÖרø3ÚÜÓ3Þ÷à÷⸠ä÷œœò.çççççççççç ç
ç ç ç
çççççççççç UnixListenerÁÿ·ç§,¡Æ.­>å,Ï>û>ç³Éáç×çø3ççÓ3ç÷ç÷ç¸ç ÷œœì/žžžžžžžžžž ž
ž ž ž
žžžžžžžžžžžžžž
UnixStreamÁº·ž¼³,½¡¼0¼­>¼æ.Á ¼Ï>¼ÙA¼û>¼òA¼‘2ÇÇ¥Ç žËþ4Ì Ë5Î žÐþ4Ñ Ð5Ó žÕÖ2Ö Õè2Ø Õƒ3Ú žÜÖ2Ý Üè2ß Üƒ3á žã³ãÉãážçמéø3žëž íÓ3ž
ï÷ž ñ÷ž ó¸ž
õ÷œ¨¨¨¨'
)
)
)
D
E
E
G
I
I
I
K
K
M
M
O
O
Q
S
T
V
V
V
X
Z
f
h
p
q
r
s
t
u
v
w
x
y
{
{
{




Š

Œ

Ž

˜



£
£
¤
¤
¥
¥
¨
¨
©
©
ª
ª
Æ
Æ
È
Ë
Í
Í
Ï
Ï
ï
ñ
ñ
ô
÷
ù


ƒ




ˆ

Š
Š
Š



Ÿ
¡
¢
£
¤
§
²
²
³
³
´
´
Á
Á
Á
Â
Ä
Ç
Ì
Ì
Ì
Ø
Ø
Ø
Ü
Ü
Ý
Ý
Þ
Þ
ã
ã
ã
ê
ê
ê
ú
û
Ž




¢

Ë
Ì
Ö
Ù
Ú
÷
ø
ý
ý
þ
þ
ÿ
ÿ


ƒ
ƒ
ƒ


ˆ
ˆ
Š
Š
Š
Œ



ž
£
£
¤
¤
¥
¥
§
§
©
©
©
«
¬
¬
®
®
®
·
½
Ä
Ä
Ä
È
È
È
Ï
Ñ
Ñ
Ñ
Ô
Ô
Ö
Ø
Ø
Ú
Ú
Ü
Ü
á
á
á
å
ì
ì
ì
ï








˜
˜



Ÿ
Ÿ
 
 
¡
¡
£
§
§
§
Ë
Î
Ï
Ð
Ñ
Ó
Ó
Ô
Ô
Õ
Õ
×
×
×
Û
á

Š

Œ

Ž





˜
˜
š
š
š
œ


Ÿ
Ÿ
Ÿ
¢
¢
¤
¤
¤
¦
¨
©
©
«
«
«
­
°
°
±
±
²
²
´
´
´
¸
¾
ä
å
æ
æ
è
è
ê
ê
ì
ì
î
î
ð
ð
ò
ó
ô
õ
ö
÷
ø
ù
ú
û
ü
ý
ý
ý
þ
þ
ÿ
ÿ
ÿ




ƒ
ˆ
ˆ


Š
Š
Œ
Œ
Œ


º
¼
Á
Â
Ã
Ã
Å
Å
Ç
Ç
Ê
Ê
Ì
Í
Î
Ó
Ó
Ô
Ô
Õ
Õ
×
×
×
Û
ã



ˆ
Š
Š


Œ
Œ
Ž
Ž
Ž

š
¿
Ã
Ä
Å
Æ
Ç
Ì
Ì
Î
Î
Î
Ð
Ñ
Ñ
Ó
Ó
Ó
Ö
Ö
Ø
Ø
Ø
Ú
Ü
Ý
Ý
ß
ß
ß
á
ä
ä
å
å
æ
æ
è
è
è
ì
ô
¢Š ÀÀÁìˆ >¸2]=FÐìœhµßœhœhœhÛœhØœhíßœhœhºœh–úœhœh•˜œhœh¿cœh«+>>·?Á*¬&œŸxËI¿cÉi¿c@@ÐAß*Bî*@øûË­Á,„j«+„j¿c½½÷&¾‡'Ö¿'Öùh´&ò,Ój«+Ój¿cÈÈÉÏ'ʈý >«÷0*—ï¿càà )á´%Ž8(Œ=´«+ák¿cääåÂ)çˆ ÏZÚ“ð5ð¢ l¿cÁÁ¸6·yLf%‡L¢ælŸ!ælŸ! 8æléælº1º1
ChildStdinÁ»1·1J,CÏ·øû­+æl«+æl¯+æléö+ö+Ž
÷+´%ä+Þí¼>XG¸,æl,æléælŸn¿cÅÅÛ6Æ·ôÝÿòÀ ë¢înà înà  8înéînÎ1Î1 ChildStdoutÁÏ1·1®Òô?éînÞ1Þ1 ChildStderrÁß1·1+Oý‹k€M¯+în«+în­+înéŸnîn,înéînŸnŠ ÉÉÊÿ6ˈ ¾Æ«bÍÀ1!ÛqØq¿cqÐìqµßqqqíßqqºqšeqéq¿cÞÞ )ß·_±æ¶ÿÌõõÜØââý"ã·j5Uþ:দ¿cér¿c||}Ùˆj V“X ÔÌi8¿cææ·8è·éÓ8»jWs6™óÚðØàsÇL ð©·\]l³ŠµùMàs¿c·t¢žBoxÁ¡ˆˆ¢ˆl }.xÏ¥çEçEèEGlobalÁ ¿±‡§í#é!è9ƒºð·ð:ð1y9»¯×?Âuö!ûu¢ûu¿cûu¿c¤¤À<¥‡'ðóv
ÞºõØév¢ÆÆ…>Ç·ª/pûœA¿c¨w¯+¨w«+¨w­+¨wéŸn¨w,¨wé¨wŸnéŠ#Š##…>Œ#ˆô" N À];óɨwà «A·çT´ÔßžàÆà  8åxŸ!åxŸ!šy¢åx¿cåx¯+åx«+åx­+åxéŸnåx,åxéåxŸné‡#‡#ˆ#«A‰#ˆô" ¤‰?ßøåx¢ßß”Fà·Ç «µï¿cÐz¯+Ðz«+Ðz­+ÐzéŸnÐz,ÐzéÐzŸnéð#ð#ñ#”Fò#ˆà# ¬ãøàFð™Ðz¢µµ¿L·ËzoΟ;¿c|¯+|«+|­+|é''“'¿L”'ˆñ& ÒÛ0É@ßh|éŸn|,|é|Ÿn¢ÿÿ£P·ç½ HºD ý¿cÊ}¯+Ê}«+Ê}­+Ê}éã'ã'ä'£På'ˆË' Nó:xÔ§eöÊ}éŸnÊ},Ê}éÊ}Ÿnà ºº•S»·ž$óñ™°k>à  8‡Ÿ!Ÿ!¼¢¿c¯+«+­+é­(­(®(•S¯(ˆê% ×¶'™g$²éŸn,éŸnÃÀÌÉÄÀÒÉÅÀÓÉÇÀÕÉÉÀÍÉÊÀÎÉäâíæ¢¤ÌÀ×ÉÎÀÙÉ#À&À(ÀH>U½ËÈâàèäÃÁÇÅÐÉàÞzâæš¦¤ÖƳßÖµÿçºF>Y½¦àÁÅÚÆ·ßÚµÿëºW½˜Á¼ÅàÆ½ßâµÿóº°äüÁ¢Å¦ÒƯßÒµÿãºÁ
¡¨
ÕºÜ
ŽÁö+šÁ°Å²Åºö+¾Å]Þö+âÆäŠ#»ö+¿Á‡#“ö+—ßð#Þ’'àö+äµã'—ö+›ÿï­(ñö+õºÁ¸ÅÜÆ¹ßܵÿíºÁ´ÅØÆµßصÿ麦ū
œ
˺Ð
ÛÉ
æŠ ˜ÐìµßÛØíß#º–ú•˜¿c«+ š,
P¢ DŸ!Mé$­+³¯+8à 8še$ÇLùMé!ö!0b0001Á0b0010Á0b0100Á0b1000Á0b10000Áü™-
ü¢"

Ä¢

´

 5ü7
À Æ
üñW
œhD…
ô ô õ ¨÷ ˆÐ  mjçítoé¹]šü¸ -
üÁ "

ÄÁ
‚Š
 0ü¯ 7
À å
ü W
œh
抃,iüà-
üé"

Äé
‚ŠD
 0ü×7
À 
ü¸W
œh
抃,iüïA
ä‘
d
4
æŠ
'˜

·
7,˜
 œ
l 
< 
æŠ
'¨
ÔŽ2
 ¬
­
üø6

Äø
‚Šæ& ­
üæK
À °
·
ü¨
œh
œh
œh,¿
æŠ^]]æŠ^æŠG¹
KvÌ»


æŠ
'Ã
ÔŽ2
 Ç
X 
 Ó
ô»
 Ø

ß
üŠU

œh
ÊÉæŠÉ!AŒÌå


æŠ
'í
ÔŽ2
 ñ
X 
 ý
ôå



ü´U

œh
ÊÉæŠÉ!AŒ¤†!
d‡!
4‡!
æŠ
'Ž!
ÔŽ2,Ž!
 !
X !
 ™!
̆!
 ž!

¥!
 üÚ K

œh
ÊÉæŠÉ!AŒ¤¢"
d£"
4£"
æŠ
'ª"
ÔŽ2,ª"
 ®"
X ²"
 µ"
Ì¢"
 º"

Á"
!üö!K
$“"
œh$Š"
ÊÉæŠÉ!AŒÌÈ#
dÉ#
4É#
æŠ
'Ð#
ÔŽ2,Ð#
 Ô#
X DØ#
 à#
ôÈ#
 å#

ì#
"ü—#U
$¹#
œh$°#
ÊÉæŠÉ!AŒ¨r¨r¨r÷Ø ¨r4AN 
 ùüØ#Øìœ±œ±œ¡³œø±œ³H% ÚèØ±œ³œc¨r¨r¨r¨rüÉ4$ 
„É4 
ŒÄ”Ú4 ¨r
9ü¬4L ¤ ÷4 þ4 žü…4y évT—4 ¤]¤]V¦]Á‚]üß3ø¤”&¨r²K¨rœ£
ÀÁ%œh0æŠ8?ÐAë ÈÉ&¨k18?¼á äå'ääåÂ)çˆ ÏZÚ“ð5` jq„±' ÉÊ%q0¨r7>¼À@ |}%||}Ùˆj V“X ÔÌi\ üü epoll_eventÁýŒþÚ¢f¸q*[\_i·¾¿ð¨À© °­ìD”
À±·$­
>³Ð
@´ÿ6,Í
ɵÿ6ʵ ),ŸÞüÊOü³OL Mio is a fast, low-level I/O library for Rust focusing on non-blocking APIsÁüƒPM and event notification for building high performance I/O apps with as littleÁüÔ2/ overhead as possible over the OS abstractions.Áú\ # UsageÁúü›OL Using Mio starts by creating a [`Poll`], which reads events from the OS andÁüëMJ puts them into [`Events`]. You can handle I/O events from the OS with it.Á¹úü½" For more detail, see [`Poll`].Áàúüä%" [`Poll`]: ../mio/struct.Poll.htmlÁüŠ/, [`Events`]: ../mio/event/struct.Events.htmlÁºú ## ExamplesÁÎúüÒPM Examples can be found in the `examples` directory of the source code, or [onÁ GitHub].Á°úü´EB [on GitHub]: https://github.com/tokio-rs/mio/tree/master/examplesÁúú ## GuideÁúüA> A getting started guide is available in the [`guide`] module.ÁÑúÌÕ ## Available featuresÁïúüóDA The available features are described in the [`features`] module.Á*[\_i·¾¿ð¨À7©8°­ì7À±·6>³Ð5@´ÿ64ɵÿ6Eʵ )4ÞÀÃÆT‚ 4† Ķ Ï  Õ ä, Ö × â, Ø8÷& Ý8÷
ã*æ é þ, ó ô ÷+  ƒ œ8â  8»<ˆ 7¼ L’+ ª « Û8ä ´ Ú8docsrsÁ$ »8Ó½ À Ù8âÁ Ä Ø8» Í7¼ , é8÷
øäª Ç ¾ Í Ü, Î Ï Ú, Ð8÷& Õ8÷
Û*Þ á ¼, ë ì µ+ ú û 8âü ÿ ˜8
 ƒ 8»<„ Œ7¼ , §8÷
¼æ þ ­  ,   , 8÷$ˆ& Œ8÷$
* ˜ «, ¢ £ ¤+ ± ² Ê8â³  É8» ¿7os-extÁ+ Ø Ù ˆ8ä â 8Ö±$ é8Óë î 8âï ò 8» û7Ÿ¶, 8÷$—
¥¤Ò ç  í ü, î ï ú, ð8÷& õ8÷
û*þ  Ž,  Œ + š  °8✠Ÿ ¯8»<  ¨7ü)+ ¾ ¿ ë8ä È ê8Ö±$ Ï8ÓÑ Ô é8âÕ Ø è8» á7ü), ù8÷
ˆÔþl‹   Š  Ÿ  ® ,    ¡  ¬ , ¢ 8÷& § 8÷
­ *°  ³  ˆ , ½  ¾  + Ì  Í 
8âÎ  Ñ 
8ºÒ  Õ 
8» Þ 7ü)$ å 8£ç  ê  ƒ
8ú$ ï 8» ù 7Ÿ¶+

 å
8äD
 ž
 ä
8Ö±
$ ¥
8Ó§
 ª
 ã
8â«
 ®
 â
8º¯
 ²
 á
8»
 »
7ü)
$ Â
8£Ä
 Ç
 à
8ú
$ Ì
8»
 Ö
7٦
, ó
8÷

ÜÝ   ù  Ô
 ÿ  Ž ,   Œ , 8÷ & 8÷$ˆ 
*   Ò
,  ž  Ë
+ ¬  ­  Û 8â®  ±  Ú 8º²  µ  Ù 8»  ¾ 7Ÿ¶ $ È 8»  Ò 7ü) + é  ê  ¯
8ä  ó  ®
8Ö± $ ú 8Óü  ÿ  ­
8â
 ƒ
 ¬
8º

 «
8»<ˆ

7٦D
$ š
8»
 ¤
7ü)
, ½
8÷

Ì
”×

 ê
 £ ð
 ú
, ñ
 ò
 ø
, ó
8¿ ô
& õ
8¯ö

ù
*ü
 ÿ
 ¡8Ø Œ  8¹$ ,   , 8¿ ˜
šŒ¦ ¸ ð ¾ È, ¿ À Æ, Á8¿ Â& Ã8¯Ä
Ç*Ê Í î8Ø× Ú Û è8Õ$ à, â ã æ, ä8¿ å
ç”ó,€  ¿ Œ ,  Ž , 8¿ & 8¯
*˜  ½8Ø¥ ¨ © ·8Ì$ ¯, ± ² µ, ³8¿ ´
„ÂÏ Ó À Ù ò, Ú8levelÁ& à8¼$ ç, é ê ð, ë8¿ ì& í8¯î
ñ*ô ÷ ¾+   8⃠ 8»<‡ 7Ø,‘ ¡ ¸8Ø£'¦, ¨8©È ® ¯ , ° ± ´, ²8¿ ³
µ+ ð ñ 8âò õ Š8
ö ù 8» 7Ø,„  ¸88    8¢8 ¦ ¨ ª ³, ¬ ­ °, ®8¿ ¯
±% ´d D“ ÀÁ NonZeroU8ÁL
¤”×#
¤,­
(
 œ
7
)+”Ý

”ú
D€

Ò

ê
ӟ
D
l
œh !"äñ
ü¯=
: Returns a `Interest` set representing readable interests.ÁDû
œhä
üÎ=
: Returns a `Interest` set representing writable interests.ÁDš
œhä¸
ü¯H
E Returns a `Interest` set representing priority completion interests.ÁúlinuxÁœ†
ú
¬›
ü…,
üü7

œhü¨3
ü•
 Add together two `Interest`.Áº
úüÂD
A This does the same thing as the `BitOr` implementation, but is aÁ´‹
 constant function.Á¦
ú
 ```Á´º
 use mio::Interest;ÁÕ
úüÝK
H const INTERESTS: Interest = Interest::READABLE.add(Interest::WRITABLE);Áü­2
/ # fn silent_dead_code_warning(_: Interest) { }Áüä)
& # silent_dead_code_warning(INTERESTS)Á<
ÈÒ.üËX
Hthis returns the result of the operation, without modifying the originalÁµ
œhœhœh
ú"¹
ø"ü±8
ü½+
( Removes `other` `Interest` from `self`.Áí
úüõD
A Returns `None` if the set would be empty after removing `other`.Á¾
ú
ÈÒ´Ò
ØÒí
úüõN
K const RW_INTERESTS: Interest = Interest::READABLE.add(Interest::WRITABLE);ÁÈ
úüÐ=
: // As long a one interest remain this will return `Some`.Áü’F
C let w_interest = RW_INTERESTS.remove(Interest::READABLE).unwrap();ÁüÝ'
$ assert!(!w_interest.is_readable());Áü‰&
# assert!(w_interest.is_writable());Á´
úü¼>
; // Removing all interests from the set will return `None`.Áüÿ<
9 assert_eq!(w_interest.remove(Interest::WRITABLE), None);ÁÀ
úüÈ>
; // Its also possible to remove multiple interests at once.Áü‹8
5 assert_eq!(RW_INTERESTS.remove(RW_INTERESTS), None);Á
ÈÒ.üÔX
ÓÔ4¸
œhœhÛ¼ݼÞ¼©ß¼à¼ÛἈcSñŸ«‡zÙœh
$¿
¹

üŠ&
ü»:
7 Returns true if the value includes readable readiness.Á.\ú
\—
œh
O&ü´&
üå:
7 Returns true if the value includes writable readiness.Á.\¤

œh
Ô%üÚ !
ü 6
3 Returns true if `Interest` contains AIO readiness.Á.\Ê
œh
U%üö!!
ü«!6
3 Returns true if `Interest` contains LIO readiness.Á.\æ!
4ƒ"
œh
!Ö$ü—#&
üÇ";
8 Returns true if `Interest` contains priority readiness.Á.\‡#
\¤#
œh
"\$äð#
œh$%˜ú™ú%\“$
4˜$
##œhüº$#
,½$
œhœhœh##
%$Ã$
¹
,É$
ü%"
œh'—˜'ü¸%'
d»%
ü üœhœh& È%
&
'$Í%
¹
,Ó%
ä&
œh)Àc)ü²&:
µ&
ýþÿ ýœh þ c cˆ¢cµ
 `£cbufÁ `àB¤GS
ÿÖ¿Ù¿Ú¿«Û¿ˆÜ¿Ý¿Þ¿ˆ‚†f|Â
ŸÈŸÈ ÈErrorÁ O˜éBL( ¹&
(
)$º&
×À&
D >@Œ ,*,¸«+*-¼ ÎN*.ôª+*/
AtomicBoolÁT¹¬]*1®¼À*2K²†J*3DurationÁDÆ­Ö*4×Ú¤,*6ioÁߦ*7ªi*9Ïø[*:©*;°­ìD…À*<±ÿ6,É*=µÿ6Ê*=µ\X[KN>A14Œ¥!œ»ôÔæèÕ×,éÊ̼¾®°†|Zü˜85 Polls for readiness events on all registered values.ÁÑúüÕLI `Poll` allows a program to monitor a large number of [`event::Source`]s,Áü¢OL waiting until one or more become "ready" for some class of operations; e.g.ÁüòNK reading and writing. An event source is considered ready if it is possibleÁüÁFC to immediately perform a corresponding operation; e.g. [`read`] orÁtˆ  [`write`].Áúü› NK To use `Poll`, an `event::Source` must first be registered with the `Poll`Áüê HE instance using the [`register`] method on its associated `Register`,Áü³
KH supplying readiness interest. The readiness interest tells `Poll` whichÁüÿ
LI specific operations on the handle to monitor for readiness. A `Token` isÁüÌ MJ also passed to the [`register`] function. When `Poll` returns a readinessÁüš JG event, it will include this token. This associates the event with theÁüå *' event source that generated the event.Á
úü”
0- [`event::Source`]: ./event/trait.Source.html矁
52 [`read`]: ./net/struct.TcpStream.html#method.readÁüû
74 [`write`]: ./net/struct.TcpStream.html#method.writeÁü³63 [`register`]: struct.Registry.html#method.registerÁêú # ExamplesÁýúü=: A basic example -- establishing a `TcpStream` connection.Á¿ú,ÿ```ÁäÖ # use std::error::Error;Áüó/, # fn main() -> Result<(), Box<dyn Error>> {Áü£-* use mio::{Events, Poll, Interest, Token};ÁäÑ use mio::net::TcpStream;Áîúüò%" use std::net::{self, SocketAddr};Á˜úüœ*' // Bind a server socket to connect to.ÁüÇ2/ let addr: SocketAddr = "127.0.0.1:0".parse()?;Áüú/, let server = net::TcpListener::bind(addr)?;Áªúü®MJ // Construct a new `Poll` handle as well as the `Events` we'll store intoÁüü  let mut poll = Poll::new()?;Áü1. let mut events = Events::with_capacity(1024);ÁÏúÌÓ // Connect the streamÁüí?< let mut stream = TcpStream::connect(server.local_addr()?)?;Á­úü±&# // Register the stream with `Poll`ÁüØ^[ poll.registry().register(&mut stream, Token(0), Interest::READABLE | Interest::WRITABLE)?;Á·úü»KH // Wait for the socket to become ready. This has to happen in a loop toÁü‡ // handle spurious wakeups.Á loop {Áü²&# poll.poll(&mut events, None)?;ÁÙúôÝ for event in &events {ÁüüA> if event.token() == Token(0) && event.is_writable() {Áü¾OL // The socket connected (probably, it could still be a spuriousÁÔŽ // wakeup)Áô© return Ok(());Á
 # }ÁÈÒöúŒú # PortabilityÁŒúüLI Using `Poll` provides a portable interface across supported platforms asÁüÝ>; long as the caller takes the following into consideration:Áœú¼  ### Spurious eventsÁ¸úü¼EB [`Poll::poll`] may return readiness events even if the associatedÁü‚EB event source is not actually ready. Given the same code, this mayÁüÈNK happen more on some platforms than others. It is important to never assumeÁü—JG that, just because a readiness event was received, that the associatedÁüâ# operation will succeed as well.ÁúüŠLI If operation fails with [`WouldBlock`], then the caller should not treatÁü×NK this as an error, but instead should wait until another readiness event isÁ
received.Á´úÔ¸ ### Draining readinessÁÓúü×KH Once a readiness event is received, the corresponding operation must beÁü£ NK performed repeatedly until it returns [`WouldBlock`]. Unless this is done,Áüò NK there is no guarantee that another readiness event will be delivered, evenÁüÁ!52 if further data is received for the event source.Á÷!úüû!2/ [`WouldBlock`]: std::io::ErrorKind::WouldBlockÁ®"úä²" ### Readiness operationsÁÏ"úüÓ"JG The only readiness operations that are guaranteed to be present on allÁüž#NK supported platforms are [`readable`] and [`writable`]. All other readinessÁüí#HE operations may have false negatives and as such should be consideredÁü¶$JG **hints**. This means that if a socket is registered with [`readable`]Áü%MJ interest and either an error or close is received, a readiness event willÁüÏ%GD be generated for the socket, but it **may** only include `readable`Áü—&GD readiness. Also note that, given the potential for spurious events,Áüß&NK receiving a readiness event with `read_closed`, `write_closed`, or `error`Áü®'JG doesn't actually mean that a `read` on the socket will return a resultÁüù'! matching the readiness event.Á(úüŸ(PM In other words, portable programs that explicitly check for [`read_closed`],Áüð(EB [`write_closed`], or [`error`] readiness should be doing so as anÁü¶)MJ **optimization** and always be able to handle an error or close situationÁü„*.+ when performing the actual read operation.Á³*úü·*>; [`readable`]: ./event/struct.Event.html#method.is_readableÁüö*>; [`writable`]: ./event/struct.Event.html#method.is_writableÁüµ+85 [`error`]: ./event/struct.Event.html#method.is_errorÁüî+DA [`read_closed`]: ./event/struct.Event.html#method.is_read_closedÁü³,FC [`write_closed`]: ./event/struct.Event.html#method.is_write_closedÁú,úÜþ, ### Registering handlesÁš-úüž-HE Unless otherwise noted, it should be assumed that types implementingÁüç-MJ [`event::Source`] will never become ready unless they are registered withÁ\µ. `Poll`.ÁÁ.ú„Å.
For example:ÁÖ.ú,–/\/†öäí/•öœŠ0 # use std::net;Áüž0/»öüÎ0%" use mio::{Poll, Interest, Token};Áäô0ª÷ì‘1 use std::net::SocketAddr;Áä¯1 use std::time::Duration;Á¤Ì1 use std::thread;Áá1úüå152 let address: SocketAddr = "127.0.0.1:0".parse()?;Áü›241 let listener = net::TcpListener::bind(address)?;ÁüÐ2?< let mut sock = TcpStream::connect(listener.local_addr()?)?;Á3úü”3*' thread::sleep(Duration::from_secs(1));Á¿3úäÃ3 let poll = Poll::new()?;Áà3úüä3NK // The connect is not guaranteed to have started until it is registered atÁŒ³4 // this pointÁüÅ4\Y poll.registry().register(&mut sock, Token(0), Interest::READABLE | Interest::WRITABLE)?;Á„¢5
# Ok(())Á<³5Æ<»5ÈÒÃ5ú¼Ç5 ### Dropping `Poll`Áß5úüã5NK When the `Poll` instance is dropped it may cancel in-flight operations forÁü²6OL the registered [event sources], meaning that no further events for them mayÁü‚7PM be received. It also means operations on the registered event sources may noÁüÓ7MJ longer work. It is up to the user to keep the `Poll` instance alive whileÁü¡8,) registered event sources are being used.ÁÎ8úüÒ8.+ [event sources]: ./event/trait.Source.htmlÁ9úü…9&# ### Accessing raw fd/socket/handleÁ¬9úü°9HE Mio makes it possible for many types to be converted into a raw fileÁüù9NK descriptor (fd, Unix), socket (Windows) or handle (Windows). This makes itÁüÈ:JG possible to support more operations on the type than Mio supports, forÁü“;LI example it makes [mio-aio] possible. However accessing t
ŒÈ‘úespidfÁ¤ã‘úfuchsiaÁ¬úhaikuÁœ ’ú’úhurdÁ”Û’úntoÁŒ÷’ú ¬’“ú ”±“úcygwinÁ¤Í“ú‡Í¬ë“ü¾‘Èüº‘Íüýüô˜ÉiG¬+Gä©”L¬”ƒ  ƒ ÉiF ¶”F
G$·”Äó”ÉiIÀcIü’•:•• „ Éi  c cˆ¢cµ
 `£cäå `àB¤GS
‹çH ™•H
I$š•× •l‚–„jKMOQSTü«µü––;8 Register an [`event::Source`] with the `Poll` instance.ÁÖ–úüÞ–JG Once registered, the `Poll` instance will monitor the event source forÁü­—KH readiness state changes. When it notices a state change, it will returnÁüý—FC a readiness event for the handle the next time [`poll`] is called.ÁȘúüИ0- See [`Poll`] docs for a high level overview.Á…™ú| # ArgumentsÁ¡™úü©™JG `source: &mut S: event::Source`: This is the source of events that theÁüø™?< `Poll` instance should monitor for readiness state changes.Á¼šúüÄšJG `token: Token`: The caller picks a token to associate with the socket.Áü“›JG When [`poll`] returns an event for the handle, this token is included.Áüâ›DA This allows the caller to map the event to its source. The tokenÁü«œEB associated with the `event::Source` can be changed at any time byÁÜõœ calling [`reregister`].ÁúüEB See documentation on [`Token`] for an example showing how to pickÁ¬ç [`Token`] values.Ážúü‰žJG `interest: Interest`: Specifies which operations `Poll` should monitorÁüØžJG for readiness. `Poll` will only return readiness events for operationsÁü§Ÿ specified by this argument.ÁËŸúüÓŸKH If a socket is registered with readable interest and the socket becomesÁü£ 63 writable, no event will be returned from [`poll`].ÁÞ úüæ LI The readiness interest for an `event::Source` can be changed at any timeÁô·¡ by calling [`reregister`].ÁÚ¡ú\â¡Ðßò¡úüú¡GD Callers must ensure that if a source being registered with a `Poll`ÁüÆ¢HE instance was previously registered with that `Poll` instance, then aÁü“£EB call to [`deregister`] has already occurred. Consecutive calls toÁüÝ£'$ `register` is unspecified behavior.Á‰¤úü‘¤KH Unless otherwise specified, the caller should assume that once an eventÁüá¤KH source is registered with a `Poll` instance, it is bound to that `Poll`Áü±¥IF instance for the lifetime of the event source. This remains true evenÁüÿ¥DA if the event source is deregistered from the poll instance usingÁœÈ¦ [`deregister`].Áà¦úüè¦0ˆóü§*' [`poll`]: struct.Poll.html#method.pollÁü̧:7 [`reregister`]: struct.Registry.html#method.reregisterÁü‹¨:7 [`deregister`]: struct.Registry.html#method.deregisterÁüʨ  [`Token`]: struct.Token.htmlÁï¨út÷¨õŠ©ú,Ω\È©†öä­ª•öœÎªßšüæª/»öüš«-ôöäÌ«ª÷ìí«Å›ü¬'$ use std::time::{Duration, Instant};Á»¬úüì £úè¬úüð¬5ºœüª­4ùœüã­A> let mut socket = TcpStream::connect(listener.local_addr()?)?;Á©®úü±®&# // Register the socket with `poll`ÁìÜ®âé¤þ® &mut socket,ÁŒ—¯§êü­¯2Ãêä¯úüì¯1Íúü¢° let start = Instant::now();Áüư-* let timeout = Duration::from_millis(500);Áø°úT€±¬þü±&# let elapsed = start.elapsed();Áº±úü± if elapsed >= timeout {Áüæ±# // Connection timed outÁÔŽ² return Ok(());ÁL­²¦»²úüò*' let remaining = timeout - elapsed;Áüò²1. poll.poll(&mut events, Some(remaining))?;Á¨³úô°³ûþüÓ³*' if event.token() == Token(0) {Áü‚´?< // Something (probably) happened on the socket.ÁôÆ´é€lé´Lû´¦,‰µ¸<“µÆ<ŸµÈÒD²µˆ  ‡ „j ˆ ¤qœhÈïJ¤LL ¾µJÎì–” »µ¢–”lŸ¶
K–”
the poll.ÁºÑúüÂÑLЙü“Ò5§šÍÒúüÕÒ?< A handle can be passed back to `register` after it has beenÁü™ÓHE deregistered; however, it must be passed back to the **same** `Poll`ÁüæÓ41 instance, otherwise the behavior is unspecified.ÁŸÔút§ÔõºÔú,þÔ\øÔ†öäÝÕ•öœþÕßšü–Ö/»öüÊÖ-ôöäüÖª÷ì×Å›ä¿×ë›à×úüè× £úØúü•Ø5ºœüÏØ4ùœüˆÙAÅ‹ÎÙúüÖÙ&žŒìÚâ餣ÚÜŒŒ¼Ú§êìÒÚ„ŸôÚúüüÚ-* poll.registry().deregister(&mut socket)?;Á®Ûúü¶Û1ÍúìÛúüôÛGD // Set a timeout because this poll should never receive any events.ÁüÀÜ:7 poll.poll(&mut events, Some(Duration::from_secs(1)))?;ÁüÿÜ assert!(events.is_empty());Á„£ÝÔ <¸ÝÆ<ÄÝÈÒT×ÝŒ  ‹ „j Œ –”ÈïJ¤PP åÝJÅ” âÝ×”l£Þ
O–”$æÝŠ4ìÝ')üçà/ü¦ß1. Creates a new independently owned `Registry`.ÁÜßúüäßIF Event sources registered with this `Registry` will be registered withÁü²à0- the original `Registry` and `Poll` instance.ÁLîà   „jÖ¿Ù¿Ú¿«Û¿ˆÜ¿Ý¿Þ¿ˆ‚†f|Â
„j™ðJ øàJ
Q$ùàT¿áQ<closure_kind>ÁR<closure_signature>ÁR<upvars>ÁRRQRÓj„j „jüËä#„þãúŠ”˜äú‡Í¬¬äü—ä+ü“ä0üýãGüôãRtÙäŽ  Ž „jJ èäJ
S$éäü¶ç/úŠ”Ñæ¤Ðæ»ü)|ææüÌæ*üÃæ5DÄç   „j  ÓjJ ÍçJ
T$Îçäˆè„jVÀcVü«è:®è     „j   c cˆ¢cµ
 `£cäå `àB¤GS
‹çU ²èU
V$³è׹贸ìú$®é—ðü¼éü»é! úÝ
ŒóéúÛð¤Žêú‚ñœ¬êúîð¬Éêúî¤èêú¡ñ”†ëú²ñŒ¢ëú ¬½ëú ”ÜëúÜñ¤øëú‡Í¬–ìüééÈüåéÍü¨éüŸé˜„jXŽ,XüÕì!,Øì “ „jÎNÎN¼ ÐN´%ä+ÑN_phantomÁä+§]òÞ^W ÞìW
X$ßì̹ðú$¯í—ðü½íü¼í! úÝ
ŒôíúÛð¤îú‚ñœ­îúîð¬Êîúî¤éîú¡ñ”‡ïú²ñŒ£ïú ¬¾ïú ”ÝïúÜñ¤ùïú‡Í¬—ðüêíÈüæíÍü©íü í˜„jZ¬+ZäÙðLÜð ” „jY æðY
Z$çð « Ó­ÕÂ)DäÕµÂ)åÕµÂ+×þÕý,óÕÖ-Ò£Õý",™ ûÕ©üÕªýÕ ),Ì6àÕŒ÷&Dͽշ(lª7ÔÕß·(ÕÕß ÉÊÔÏ'¨r^ë^äð'$ó'q¨r]]
^¹ø' ú‡Í¬É úŠ”à üÈ +üÄ 0ü» ; ÞÏ [_aÐD@_b´ÿ6,É_cµÿ6Ê_cµüè-¦_d,fhY[HJ<(!T­µrfhüÜB̾ Create a new `Waker`.Áã • „jqÖ¿Ù¿Ú¿«Û¿ˆÜ¿Ý¿Þ¿ˆ‚†f|Â
µr™ðe ñe
fÁÙ<fÁµgÙµgöµggfgákµrü§$üÁ63 Wake up the [`Poll`] associated with this `Waker`.Áüúô„ [`Poll`]: struct.Poll.htmlÁ$® – µrÈïe ³e
h$´ ü(% Readiness event types and utilities.Á, jœý",†â«©­·8$¬æ®Ü¢¯LM,QÏ [jlÿ6,Éjmµÿ6Êjmµ×#¤,jn,PRCEDérpqrstuvwxyäíôÊ Returns the event's token.Á,ô — érqo úo
püÿ!ü¾:7 Returns true if the event contains readable readiness.Áýú\…ÐßúüB? Out-of-band (OOB) data also triggers readable events. But mostÁüäB? applications don't actually read OOB data, this could leave anÁü«=: application open to a Denial-of-Service (Dos) attack, seeÁüíŒ <https://github.com/sandstorm-io/sandstorm-website/blob/58f93346028c0576e8147627667328eaaf4be9fa/_posts/2015-04-08-osx-security-bug.md>.ÁüþLI However because Mio uses edge-triggers it will not result in an infiniteÁüÏ+( loop as described in the article above.Á\† ˜  ˜ éro o
q$“ üš
!üÛ :7 Returns true if the event contains writable readiness.Á\¡
 ™ éro ­
o
r
ôüö
74 Returns true if the event contains error readiness.Á² úüº KH Error events occur when the socket enters an error state. In this case,ÁüŠ IF the socket will also receive a readable or writable event. Reading orÁüØ 2/ writing to the socket will result in an error.Á
ú\—
Ðß§
úü¯
KH Method is available on all platforms, but not all platforms trigger theÁ„ÿ

error event.Áúüœ<9 The table below shows what flags are checked on what OS.ÁÝúüå'$ | [OS selector] | Flag(s) checked |Áü‘'$ |---------------|-----------------|Áü½'$ | [epoll] | `EPOLLERR` |ÁüéIF | [kqueue] | `EV_ERROR` and `EV_EOF` with `fflags` set to `0`. |Á·úü¿;8 [OS selector]: ../struct.Poll.html#implementation-notesÁüÿ?ˆÈüÃHÑÈD—š  š éro  o
süº$üæ=: Returns true if the event contains read closed readiness.Á¨úÐßÀúüÈIF Read closed readiness can be expected after any of the following haveÁl
occurred:Áü¨?< * The local stream has shutdown the read half of its socketÁüìIF * The local stream has shutdown both the read half and the write halfÁœº of its socketÁüÒJG * The peer stream has shutdown the write half its socket; this sends aÁü¡=: `FIN` packet that has been received by the local streamÁãúüëHE Method is a best effort implementation. While some platforms may notÁü¸DA return readiness when read half is closed, it is guaranteed thatÁü# false-positives will not occur.Á©úü±<™Öòúüú'ëÖü¦'œ×üÒ'$ | [epoll] | `EPOLLHUP`, or |Áüþ2/ | | `EPOLLIN` and `EPOLLRDHUP` |Áüµ'$ | [kqueue] | `EV_EOF` |Ááúüé;ÝØü©?ˆÈüíHÑÈ › éro Ðo
tü˜&%üœ>; Returns true if the event contains write closed readiness.ÁßúÐß÷úüÿEB On [epoll] this is essentially a check for `EPOLLHUP` flag as theÁüÉJG local stream shutting down its write half does not trigger this event.Á˜úü DA On [kqueue] the local stream shutting down the write half of itsÁüé# socket will trigger this event.Á úü™ HÁÞüæ EB return readiness when write half is closed, it is guaranteed thatÁü°!#áߨ!úüà!<™Ö¡"úü©"'ëÖüÕ"'œ×ü#'Ðàü­#+( | | only `EPOLLERR`, or |ÁüÝ#1. | | `EPOLLOUT` and `EPOLLERR` |Áü“$'½á¿$úüÇ$;ÝØü‡%?ˆÈüË%HÑÈ|Ÿ&œ  œ éro ¯&o
u$°&ü«,!üü&:7 Returns true if the event contains priority readiness.Á»'ú\Ã'ÐßÓ'úüÛ'KŸÕœ«( priority event.ÁÃ(úüË(<™ÖŒ)úü”)'ëÖüÀ)'œ×üì)'$ | [epoll] | `EPOLLPRI` |Áü˜*'$ | [kqueue] | *Not supported* |ÁÄ*úüÌ*;ÝØüŒ+?ˆÈüÐ+HÑÈ\²,   éro ¾,o
v$¿,äÜ2ü‡-52 Returns true if the event contains AIO readiness.ÁÁ-ú\É-ÐßÙ-úüá-LI Method is available on all platforms, but not all platforms support AIO.Á².úüº.<™Öû.úüƒ/'ëÖü¯/'œ×üÛ/'$ | [epoll] | *Not supported* |Áü‡0+( | [kqueue]<sup>1</sup> | `EVFILT_AIO` |Á·0úü¿0?< 1: Only supported on DragonFly BSD, FreeBSD, iOS and macOS.Áƒ1úü‹1;ÝØüË1?ˆÈü2HÑÈ4ã2ž  ž éro ê2o
w$ë2ä’5ü®352 Returns true if the event contains LIO readiness.Áè3ú\ð3Ð߀4úüˆ4KH Method is available on all platforms, but only FreeBSD supports LIO. OnÁüØ452 FreeBSD this method checks the `EVFILT_LIO` flag.Á4™5Ÿ  Ÿ éro  5o
x$¡5ü­6B”»6     ™¤   éro Ù6o
y sys_eventÁLÎ6̰;üë8JG When the [alternate] flag is enabled this will print platform specificÁü¶9OL details, for example the fields of the `kevent` structure on platforms thatÁü†:KH use `kqueue(2)`. Note however that the output of this implementation isÁüÒ:.+ **not** consider a part of the stable API.Á;úü…;*' [alternate]: fmt::Formatter::alternateÁér{Àc{üÐ;8Ó;¡ ¢ £  ¡ ér ¢  c cˆ¢cµ
 `£cäå `àB¤GS
£ ‹çz ×;z
{$Ø;± Þ;7QdÇ@jð~~||}Ùˆj V“X ÔÌiðV“X ÔÌi} ð™¤Êú7Qyj–ûÊú||
}ðÔ@tØ@j||–ûüö@$8¤ ¤ §sÀcü­A8°A¥ ¦ §  ¥ §s ¦  c cˆ¢cµ
 `£cäå `àB¤GS
§ ‹ç ´A
8$µA± »ATX4\i†æý",⃫Ï$[×3¤,œ?T,D.Œ„ ü9%" A collection of readiness events.Á_úücKH `Events` is passed as an argument to [`Poll::poll`] and will be used toÁü¯MJ receive any new readiness events received since the last poll. Usually, aÁüýJG single `Events` instance is created at the same time as a [`Poll`] andÁüÈ*' reused on each call to [`Poll::poll`].Áóúü÷30 See [`Poll`] for more documentation on polling.Á«úü¯30 [`Poll::poll`]: ../struct.Poll.html#method.pollÁüã! [`Poll`]: ../struct.Poll.htmlÁút‰õ˜ú†ö䃕öü /»öäÐ use mio::{Events, Poll};Áäí뛊úüŽ1ÍúüÀ £úüç! # assert!(events.is_empty());Áúü-* // Register `event::Source`s with `poll`.Á»úü¿>; poll.poll(&mut events, Some(Duration::from_millis(100)))?;Áþúü‚  for event in events.iter() {Áü£96 println!("Got an event for {:?}", event.token());Á¸„ãÔ ÆÈÒ4 ·t\]l³Šµ”œ ªBªBö­Bäå÷<®B÷<9)
-ÜnL™¤Èu\‹·t‰ŠŒŽü¢/üEB Return a new `Events` capable of holding up to `capacity` events.ÁçúõúÈÒ¤– use mio::Events;Á¯úü·-* let events = Events::with_capacity(1024);Áüé(% assert_eq!(1024, events.capacity());Á<ÈÒ¨r·tˆˆ
Þü–ü³>; Returns the number of `Event` values that `self` can hold.ÁöúÈÒ¤ŠɈ£úü«-óˆüÝ(ª‰ÈÒD¨  ¨ ·t¨rˆ ¦ˆ
ŠôÐüá85 Returns `true` if `self` contains no `Event` values.Ážúõ¹úÈÒ¤ÍɈæúüî-óˆü À°ÈÒ©  © ·tˆ àˆ
ôùüš0- Returns an iterator over the `Event` values.ÁÏúõêú\’†öäá•öü‚/»öä¶Æ‚ä×ë›øúü€1Íúü¶ £úÛúüã$! // Register handles with `poll`.ÁŒúü”>©„×úüß ý„ü„9§…¸„ÌÔ ÆÈÒ$€ª  ª ·tææ·8è·éÓ8»jWs6™óÚª ˆ ˆ
Œ$†¼Å%üë:7 Clearing all `Event` values from container explicitly.ÁªúÐßÂúüÊIF Events are cleared before every `poll`, so it is not required to callÁ”˜  this manually.Á¯ úõÊ ú†öäÁ!•öüâ!/»öä–"Æ‚ä·"ë›Ø"úüà"1Íúü–# £ú»#úüÃ#$þì#úüô#>©„·$úÄ¿$ // Clear all events.ÁœÜ$ events.clear();Áüô$À°„˜%Ô <­%Æ<¹%ÈÒ,Ì%«  « ·tˆ Ò%ˆ
$×%ü¯&0½&¬  ¬ ·t ¬ Õ‡ˆ Á&ˆ
Ž$Æ&üƒ'$ð±t‘ÈLÉLÊLˆ'L®'$³' ðérlÉ'DÎ'àsüè'$Lë'±t±tÉL
ð$õ'ô¬(ðàs–˜úMûMÿM€N˜±(LÑ($Ö(Ê™üí(($ð(­  ­ àsÛ¼ݼÞ¼©ß¼à¼ÛἈcSñŸ«‡zÙàsúM õ(
ð$ú(üË*-LÎ*®  ® às¨rÛ¼
 `£cäå `àB¤GS
± ‹çš ¶,š
$·,± ½,Td4hìD Àœž±ÐD@œŸ´ÿ6, Éœ µÿ6Êœ µüè2¦œ¡,uwacNP<-#„Ÿü7=: An event source that may be registered with [`Registry`].Áuúüy?< Types that implement `event::Source` can be registered withÁü¹IF `Registry`. Users of Mio **should not** use the `event::Source` traitÁüƒNK functions directly. Instead, the equivalent functions on `Registry` shouldÁ be used.Áßúüã&# See [`Registry`] for more details.ÁŠúüŽ)& [`Registry`]: ../struct.Registry.htmlÁ¸úü¼" # Implementing `event::Source`ÁßúüãOL Event sources are always backed by system handles, such as sockets or otherÁü³JG system handles. These `event::Source`s will be monitored by the systemÁüþLI selector. An implementation of `Source` will almost always delegate to aÁüËOL lower level handle. Examples of this are [`TcpStream`]s, or the *unix only*ÁŒ› [`SourceFd`].Á­úü±/, [`TcpStream`]: ../net/struct.TcpStream.htmlÁüá.+ [`SourceFd`]: ../unix/struct.SourceFd.htmlÁúü” # Dropping `event::Source`sÁ´úü¸OL All `event::Source`s, unless otherwise specified, need to be [deregistered]ÁüˆNK before being dropped for them to not leak resources. This goes against theÁü×OL normal drop behaviour of types in Rust which cleanup after themselves, e.g.Áü§ KH a `File` will close itself. However since deregistering needs access toÁüó 96 [`Registry`] this cannot be done while being dropped.Á­
úü±
=: [deregistered]: ../struct.Registry.html#method.deregisterÁï
ú
õ úü† :7 Implementing `Source` on a struct containing a socket:ÁÁ ú,  †öüØ )& use mio::{Interest, Registry, Token};ÁÜ‚
 use mio::event::Source;Áäž
ª÷»
ú„¿

use std::io;ÁÐ
úÌÔ
 # #[allow(dead_code)]ÁÌî
 pub struct MySource {ÁÔˆ socket: TcpStream,Á¸©úô­ impl Source for MySource {ÁüÌVS fn register(&mut self, registry: &Registry, token: Token, interests: Interest)Áì£ -> io::Result<()>ÁüË74 // Delegate the `register` call to `socket`Áüƒ<9 self.socket.register(registry, token, interests)Á¦ÊúüÎXU fn reregister(&mut self, registry: &Registry, token: Token, interests: Interest)Á짃±©±üÏ96 // Delegate the `reregister` call to `socket`Áü‰>; self.socket.reregister(registry, token, interests)Á¦ÒúüÖIF fn deregister(&mut self, registry: &Registry) -> io::Result<()> {Áü 96 // Delegate the `deregister` call to `socket`ÁüÚ,) self.socket.deregister(registry)ÁL‡¦,‘¸<—ÈÒ¢¢ÎìüŸ ¢„¸„¸ £¤¥£¤¥£¤¥üŒˆü¶74 Register `self` with the given `Registry` instance.ÁòúüúKH This function should not be called directly. Use [`Registry::register`]ÁüÊKH instead. Implementors should handle registration by delegating the callÁìš to another `Source` type.Á¼úüÄC@ [`Registry::register`]: ../struct.Registry.html#method.registerÁD² ³  ² Œ¸ ³ „jqœhÈï¢ ¡¢
£Œ¸ÁÙ‹”üƒŠüš:7 Re-register `self` with the given `Registry` instance.ÁÙúüá41 This function should not be called directly. UseÁüš@= [`Registry::reregister`] instead. Implementors should handleÁüßKH re-registration by either delegating the call to another `Source` type.Á¯úü·GD [`Registry::reregister`]: ../struct.Registry.html#method.reregisterÁT†´ µ  ´ Œ¸ µ „jqœhÈï¢ š¢
¤Œ¸ÁÙ‹”üó@ü“96 Deregister `self` from the given `Registry` instance.ÁÑúüÙ4¯¼ü’@= [`Registry::deregister`] instead. Implementors should handleÁü×C@ deregistration by delegating the call to another `Source` type.ÁŸúü§GD [`Registry::deregister`]: ../struct.Registry.html#method.deregisterÁTö·  ¶ Œ¸ · „jÈï¢ ¢
¥Œ¸$†Áü·7¥§§ÎìÂu ¼¢Âu©ª£¤¥ª¨©79üõ¸ ¹  ¸ u ¹ „jqœhÈï¦ Š ¦
¨Âu$ ÁD Ù‹”üÀ!‰TÃ!º »  º u » „jqœhÈï¦ ×!¦
©Âu$Ü!ÁDê!Ù,‡"‹”L"ü#?T#¼ ½  ¼ u ½ „jÈï¦ #¦
ªÂu$¢#ÁD¨#”yô>d•é>ì>Ý>à>¤»Õ>ló R”Š
&R$¦
8R8RIRIRdÆ
ZRd˜~RdŠÌ Unix only extensions.Áú»Ÿ¶”·Ô°ü§%$’¸Â)Dä½ÕµÂ)+Då½Õµ Unix pipe.Áêúüö/, See the [`new`] function for documentation.Áæ Ê õºÛ6DÏÅ»¸64ÙÁ¼„·79)+¤õôD„¡ô¸ # Mio's optional features.ÁÛúüã:7 This document describes the available features in Mio.Á¢úÄÑôË## `os-poll` (enabled)Á¼úüÄJG Mio by default provides only a shell implementation that `panic!`s theÁü“EB moment it is actually run. To run it requires OS support,

œhÈÈ!'<À  À œhÇ
Ç
È…(Š

œh/3œhËÙËMOÁ  Á œhœhÊŠ
Ê
˘P
œhÍïßÍ"$ à   œh à œhÛ¼ݼÞ¼©ß¼à¼ÛἈcSñŸ«‡zÙ¿ßÀßÁßLessÁÂßÃßÄß~Å߯ßÇßGreaterÁÈßåºÝÈnûê7Ì
Ì
Í#¹
*
œhÏ»Ï!#Ä Å  Ä œh Å œh˜Î
Î
Ï~¹
„ü£j üï\ Return a new `Poll` handle.Á—]úü£]GD This function will make a syscall to the operating system to createÁüó]GD the system selector. If this syscall fails, `Poll::new` will returnÁœÃ^ with the error.Áß^úüë^UR close-on-exec flag is set on the file descriptors used by the selector to preventÁüÉ_FC leaking it to executed processes. However, on some systems such asÁü˜`KH old Linux systems that don't support `epoll_create1` syscall it is doneÁüì`FC non-atomically, so a separate thread executing in parallel to thisÁü»aGD function may accidentally leak the file descriptor if it executes aÁü‹b-* new process before this function returns.ÁÁbúüÍb-* See [struct] level docs for more details.ÁƒcúôcßÞ¶cútÂcõÙcú<åcÈÒäõc•öüšd/»öäÒd use mio::{Poll, Events};Áä÷d뛜eúü¨e&# let mut poll = match Poll::new() {ÁÌ×e Ok(poll) => poll,ÁüùeHE Err(e) => panic!("failed to create Poll instance; err={:?}", e),Á4Êf };ÁÙfúüåf2/ // Create a structure to receive polled eventsÁü g1ÍúÚgúüæg<9 // Wait for events, but none will be received because noÁü«hGD // `event::Source`s have been registered with this `Poll` instance.Áüûh>; poll.poll(&mut events, Some(Duration::from_millis(500)))?;ÁüÂiÀ°„êiÔ <ƒjÆ<“jÈÒ»¼ ˜)ˆØ)‚ªjÖ¿Ù¿Ú¿«Û¿ˆÜ¿Ý¿Þ¿ˆ‚†f|Â
Éi™ðCC
ÐTëjÐÁµÑÙµÑöµÑÑÐÑœ·ÉỼ ˜5ˆØ5‚ Â Ù Ì Ø, Ú8!& ß8¼ ç ÷, è8
event_typeÁ& ó8´õ$ ø, ú8& ÿ8õ
$$ ,   Æ ,   §+  ˜ ¦, 8ê&  8û
¨, ª8& ¯8¼'·, º8flagÁ& ¿8¼$ Ç È, Ê Ë Í$ Ì
Î*Ú Ý Ò
8, ò8! ÷ ƒ, ø8¯% 8$“8ט'8p,8
£, §8! ­ È8 ¿8× Šç
 Æ8$ Ë8± Í& Î Ð8Ñ8×Õ'Ø8ˆ ã:8ä æ(é8×ì'ï8Í ø º8Ž88 written_oneÁ\ ¢8 % ©, ¿ À , Ú Û æ+ Ü Ý å, Þ8ê
ç+   ž 8« ˆ  84‰ ' 8 bad_bit_maskÁd  Û  ì
8É
, Ì
8
 Ñ
 ê
  Ò
8
 ×
7ˆ Ø
$ Ù
 Û
, Ü
8
'â
, å
8¡Ÿ
 ì
 Ò
8Ž  8í¢\’  ž  Á  8Ö2  É  Ê  å 8± Ë $ Ì 7û $ Ò 8Ô  Ý  Þ  ä , ß 8¡Ÿ - æ % ç 8í¢\  8 $ % Ÿ 8  È  ´
8Ö2  ó  ô 
8± õ $ ö 7|{}Á $ ý 8ÔLÿ  ˆ


, Š
8¡Ÿ$
-
%
 ƒ8 œ8í¢\ © ì8Ö2 È É Ö8± Ê$ Ë7(empty)Á8 ó ¨8«    % Ó»¼ ˜6ˆØ6‚ލëþ£Â)D”äµÂ)åµý"Ütû©×tüªÒtý )ÍtàŒ÷&Èt½·(ÃtÔß·(ÚtÕߤž ³ ¸ ¹ ß, º8 »& ½8¼,¿ Å Ý, Ç È Ó, É8argÁÊ& Í8$ Ô
Õ, × Ø Ú$ Ù
Û*á ä µ å ´+ ï ð 8« ö 8
unused_unsafeÁ88resÁ 8"4™   ¸8'¦, ¨8 © « , ¬ ­ ´, ®8䬯$ ²
µ% ¹8Ã8£®Æ Ê7ˆ Ì Î 8Ü ß ÿ8Àà'ã8üèå'ç8íæ'î8
last_os_errorÁ ý þ8$‹  ®8«ž   ¤8£®¡% T‹ »¼ ˜7ˆØ7‚/DÆ Óìúûüý½Íüè ¦Ö׌ $,ÖÙ¸<%«+ÖÚ¼ T.ÎNÖÛÖL:­+ÖÜŽ
<Eö+ÖÝô,Nª+ÖÞ AtomicUsizeÁ\‡„ÄÖà®D”¼ÀÖáÍè­ÖÖâEPOLLETÁ<Ä ¨ÖäEPOLLINÁ<Í šÖåEPOLLOUTÁDÖ œÖæEPOLLPRIÁDà Öç
EPOLLRDHUPÁTê ¤ÖèìD„ÀÖê±ÿ6,ŽÉÖëµÿ6ÊÖëµ )ÈyàŒµ µÖ¼·(¼yÔß·(ÏyÕß< \ýïòáäÓÖÅÈ·ºŒs¡¤œ£nqWZ?B'*
îðÜý„êÄä<„Öƒ C/ÓjîïñôÂÄü¬$³Ö¿Ù¿Ú¿«Û¿ˆÜ¿Ý¿Þ¿ˆ‚†f|Â
Ój™ðíí
îü/L”Æ  Æ Ójâ¸í ží
ïïÁµðÙµðöµððïðŸnÓj Ójü‘ V4˜ Ç È  Ç Ój È Õ‡¼îÈïí Ÿ í
ñ$  Œòï$™
ñÁµòÙµòöµòòñòïTñÁµóÙµóöµóóñó Õ‡üÓVÉ  É ÓjqœhÈïí ãí
ô´%êÙ‹”ïôÁµõÙµõöµõõôõÀ½´/Ój÷Ž,÷üº!Ê  Ê ÓjÎNÎN¼ ÐN´%ä+ÑNì¼ä+§]òÞ^Ê ö Ãö
÷Ìÿ/Ójù¬+ùäŸË  Ë Ójø ¬ø
ùüã1”æÖœh
ú‹”™¤÷Õ‡/ôƒˆŠ×ÿ¤,ýþý"T€ûýÿÕÿ6,¯ Éýµÿ6Êýµ ©€d¨ @ü» $Ì  Ì ™¤q Ï 
ªü!)\!Í  Í ™¤ ©!
ª,¢!üÄ")\Ë"Î  Î ™¤ Þ"
ƒª,×"ü·#&D¾#Ï  Ï ™¤ Î#
ª,Ç#ü§$,t®$Ð  Ð ™¤ Ä$
ª,½$ü˜'-|Ÿ'Ñ  Ñ ™¤ ¶'
ª,¯'üõ*)\ü*Ò  Ò ™¤ +
ª,ˆ+üè+ 4ï+Ó  Ó ™¤ ù+
ˆ ö+üÚ, 4á,Ô  Ô ™¤ ë,
 è,ü°-Nl·-Õ Ö ×  Õ  c cˆ¢cµ
 `£cäå `àB¤GS
Ö  × ™¤‹ç È-
б Å-ª,á-ü¾.6dÁ.ýØ Ù  Ø  Ù  Ó.
gotÁÎ.wantÁ$Ù.ô³6I„tã L”»¼ y w /,˜ÓàFileÁ$
Žüè$!¦ŽReadÁ$'à ŽWriteÁ,-Ÿ!ޏ<i«+ŽÖLr­+Žô,}ª+Ž÷&D˜ÕìD„ÀŽš±ÿ6,ŽÉ޵ÿ6ÊŽµlþ<îÛÝÆÈ\[¹»©«›¤âvxacTþ/ákžŸ¡¢£¤üÔIâÚ  Ú ÓjqÖ¿Ù¿Ú¿«Û¿ˆÜ¿Ý¿Þ¿ˆ‚†f|Â
ák™ðœ ðœ
ßÙüº5„ÈÔΜœ
žüÄ + Û  Û ákÈïœ × œ
Ÿ  ¤¨rü¢"Ü  Ü ákœ ¾œ
¡$¿ü¶(ÄÝ  Ý ákÛ¼ݼÞ¼©ß¼à¼ÛἈcSñŸ«‡zÙœ Çœ
¢ü—"Þ  Þ ákœ «œ
£üé!Žß  ß ákÈïœ òœ
¤ §¨r´‘/ák§¬+§ä®à  à ák¦ »¦
§»¼ ZX»Ÿ¶”²Ô¬/DÏÓäåüè ¦¨©ô,@ª+¨ªª,–i¨¬ìDÀ¨­±Ð@¨®´ÿ6,±É¨¯µÿ6ʨ¯µ<Ÿ”3rt]_IKüŠ'/ð±± l²³´£¤¥³´²ü¸á â  á  l â „jqœhÈï° Í°
²ðÁÙ‹”L“üTã ä  ã  l ä „jqœhÈï° ¤°
³ðÁÙ‹”üæ?å æ  å  l æ „jÈï° ô°
´ðÁDÿÄ„œ•(»¼ " »Ÿ¶”Ò mio_unsupported_force_waker_pipeÁü§ —ðü²!úfreebsdÁ¬ü!úiosÁŒ§"úmacosÁœÎ"útvosÁ”÷"úvisionosÁ´Ÿ#úwatchosÁ¬Ë#üæ!üØ ªúÝ
Œ×$ú dragonflyÁ¼ö$ú‚ñœ›%ú¡ñ”¼%únetbsdÁ¤Ü%ú²ñŒþ%úopenbsdÁ¬&úredoxÁœÀ&ú ¬á&ú ”„'úÜñ¤¤'üøËúî¤Ñ'´Ð'úŠ”ô'¤ó'üë£ üâ® /$¤(¹õÀÁÅüèM¦·ô,bª+¸ÄÊÞIoSliceÁ<¼æLà
IoSliceMutÁTÅö áñÊà â‰ËŸ!㌠,師+æ¼ T€ÎNçÖ­+èð L—¯+éŽ
ö+ê—o\¿Þ1ìÌlT̺1íÔn\ØÎ1îè9Dýïª,“iñìÀò±Ð@ó´ÿ6,®Éôµÿ6Êôµ<Hî”Uàüj1<xÖ¿Ù¿Ú¿«Û¿ˆÜ¿Ý¿Þ¿ˆ‚†f|Â
¨r™ð
¹ ˜¨r ·¨rœÂ2SÓjùh´&ò¾¿„âÄÜùÖ½½¨r\ˆˆÖ½½Ÿn(9º?ÓjÁÀcÁ!#ç è é  ç Ój è  c cˆ¢cµ
 `£cäå `àB¤GS
é ‹çÀÀ
ÁıÊü˜X»Ÿ¶ »ü)x=Ê ø=µ %ø=¬ 0ê  ê ÓjqœhÈïí ªí
´%±Ù‹”ÂÁµÃÙµÃöµÃÃÂÃÀ½üÉ5»Ÿ¶ý»ü)ú÷óë  ë ÓjÈïí Ûí
Ä´%âõÄÁµÅÙµÅöµÅÅÄÅÀ½»ü)x@Ö ú»Ÿ¶Ð@ê ø@Õ 0ø@Ì ;7ÓjÇÌÚ„¿Ĺáì  ì Ój¨rÆ äÆ
ÇP8lÒ/ý¨k>«÷0*—ïÉʨkP6ý¨kÈÈ
ÉXAøýÈÈÈA“8¨kÌÀcÌøA¿8í î ï  í ¨k î  c cˆ¢cµ
 `£cäå `àB¤GS
ï ‹çËË
̱¼é6»ü)x¤Ö ú ¤ë »Ÿ¶¤ñ Фê ø¤Õ 0ø¤Ì ;9œí6ÖÔÕüèW¦ÍÎô,lª+ÍÏìD€ÀÍѱÐ@ÍÒ´ÿ6,”ÉÍÓµÿ6ÊÍÓµ<R‹”_|,xmoXZD9l¯ÔÔÕ·( êð®‰oxêð®‰oxÕQLÔÔô9ôïרÜÝÞüØ$æôïÖÖ
×ü tñ ò  ñ ôï ò ÂuÖ¿Ù¿Ú¿«Û¿ˆÜ¿Ý¿Þ¿ˆ‚†f|Â
£™ðÖ¥ÙÚ£ÛÛÙÚ ½ÖÍìÂu ´Íìîñ ·ÍìÍò ºð –"îñ ð ÂuÜøð îñÛó˜"ÿñl†
ØÂuîñÍò± ÄüèÊŽŠŒˆüŒ¥ó ô  ó ôï ô „jqœhÈïÖ ¬Ö
ÜÁD¿Ù‹”´%ü¬§õ ö  õ ôï ö „jqœhÈïÖ ÎÖ
ÝÁÙ‹”L”´%±üÐU÷ ø  ÷ ôï ø „jÈïÖ éÖ
ÞÁ´%ü•7"pš¼Ó:,åák8(Œ=´áñŽààÄÊ·õýmï˜"ù.»Ë¤ákãÀcã#%ù ú û  ù ák ú  c cˆ¢cµ
 `£cäå `àB¤GS
û ‹çâ¥Ëâ
ãDZÍlPüºHE Adapter for [`RawFd`] providing an [`event::Source`] implementation.Áƒúü‡EB `SourceFd` enables registering any type with an FD with [`Poll`].ÁÍúüÑIF While only implementations for TCP and UDP are provided, Mio supportsÁü›NK registering any FD that can be registered with the underlying OS selector.Áüê-* `SourceFd` provides the necessary bridge.Á˜úüœLI Note that `SourceFd` takes a `&RawFd`. This is because `SourceFd` **doesÁüéHE not** take ownership of the FD. Specifically, it will not manage anyÁü²PM lifecycle related operations, such as closing the FD on drop. It is expectedÁüƒ=: that the `SourceFd` is constructed right before a call toÁüÁ=: [`Registry::register`]. See the examples for more detail.Áÿúüƒ1. [`event::Source`]: ../event/trait.Source.htmlÁüµ!Ìü×C‰ºúõ® ú„² 
Basic usage.ÁÃ ú, 

†öä– •öü³ /»öüã %" use mio::{Interest, Poll, Token};Á„‰ 
#[cfg(unix)]Áäš  use mio::unix::SourceFd;Áô·  #[cfg(target_os = "wasi")]ÁäÖ  use mio::wasi::SourceFd;Áó úì÷  use std::os::fd::AsRawFd;Áô•
 use std::net::TcpListener;Á´
úÔ¸
 // Bind a std listenerÁüÓ
52 let listener = TcpListener::bind("127.0.0.1:0")?;ÁúäËžªúä® // Register the listenerÁìËâéüé-* &mut SourceFd(&listener.as_raw_fd()),ÁŒ—§êì©„Ÿ„ÇÔ ÆÈÒèúüìKH Implementing [`event::Source`] for a custom type backed by a [`RawFd`].Á¸ú†öüÕ0- use mio::{event, Interest, Registry, Token};Á„†…‚ä—ž‚ô´ÂäÓê‚ðúÜô use std::os::fd::RawFd;Á×®¡úÌ¥ü®¬¿ pub struct MyIo {Á”Õ fd: RawFd,Á¸îúüò! impl event::Source for MyIo {Áü”V¤°ì냱L‰©±ü“C@ SourceFd(&self.fd).register(registry, token, interests)ÁLצáúüåXܲ쾃±©±üæEB SourceFd(&self.fd).reregister(registry, token, interests)Á¦úüºIü´ü„30 SourceFd(&self.fd).deregister(registry)ÁL¸¦¸ÈÒ<Dìðææ lÏZÚ“ð5åç ð llPJ¦Ž lää
åðõä䦎٥ðéé lêÀcêNP46ü ý þ  ü  l ý  c cˆ¢cµ
 `£cäå `àB¤GS
þ ‹çè§Ùè
êðß±å<¶»ü)x¨ ¸¨š=ºÓôõöûýüè ¦ëìš< ÀëíIpv4AddrÁD3¾ºëïIpv6AddrÁD=̺ëð
SocketAddrÁTG“¼ëñ SocketAddrV4ÁdSª¼ëò SocketAddrV6Áda½¼ëó<ÃŒ´D(ŸikLN/1üqbl“¼”¼•¼V4Á–¼ˆ—¼˜¼V6Á™¼ˆ cÌ£•Ö¿Ù¿Ú¿«Û¿ˆÜ¿Ý¿Þ¿ˆ‚†f|Â
™ð
ôaddrÁ$ socket_typeÁ\Ÿü¤bÿ“
õdomainÁ4½ñ“üÓ =|äööÖ*÷í*ëø÷*ëÔ'ô9ö…Ô'ô9ö…÷ø¬úúëöö˜˜ sockaddr_inÁ
sin_familyÁšsin_portÁsin_addrÁœsin_zeroÁ¡“m¯qÛœŸ´•ëöö¥¥ sockaddr_in6Á¦ sin6_familyÁ§ sin6_portÁ¨
sin6_flowinfoÁ© sin6_addrÁª
sin6_scope_idÁ<Ÿ5MLnQ‡¤°=å•úüË4ÿ  ÿ å• sockaddrÁŽ sa_familyÁsa_dataÁó$îUm¾&ù àù
úüþR
 
«“å• ž
ûå“ ëûû¨rü7lt²7 sockaddr_storageÁ ss_familyÁ __ss_pad2ÁÃ 
__ss_alignÁà 5;TnìÈD4Ö¿Ù¿Ú¿«Û¿ˆÜ¿Ý¿Þ¿ˆ‚†f|Â
«“™ð
ýstorageÁ<Æ7”È»ü)=Û­Žüè ¦þÿš< Àþ MaybeUninitÁ\%ÑÛþü)$Bž"þŒ‘TH“¼þ¸<‰«+þÖL’­+þˆÄ*TŒ õþŠ”+\˜ ûþ¬+t¥ ýþŒ<ÛDÌα³D7£<•\{tv¬ôgiVXEGü·J«“ÿ“
˜ü²Q
 
©x«“Èï Í
ŽsocketÁ4Åå“ü›R
 
”z«“Èï ¹
ןå“üŒ
O
ƒ
 ƒ
©xÈï ©

ן
backlogÁ<¼
ü  Y 
 
©xÈï Ä 
ן  reuseaddrÁL× üŸ]4­
 
©xÖ¿Ù¿Ú¿«Û¿ˆÜ¿Ý¿Þ¿ˆ‚†f|Â
”z«“™ð ¾
ò.D´D–ÁµÙµöµý”z4˜'ÁµÙµöµ«“¤”z”ä»ü)

=¡¢üè ¦íëü)$*ž"Œ‘T0“¼š¸<q«+œÖLz­+¯*lô ôŸ”+\ƒ û <¤D•D$vx\chjXZ¬ÜLN;=ü’;$™«“Ö¿Ù¿Ú¿«Û¿ˆÜ¿Ý¿Þ¿ˆ‚†f|Â
Ñ{™ð
¡å“üÍB
 
Ñ{Ö¿Ù¿Ú¿«Û¿ˆÜ¿Ý¿Þ¿ˆ‚†f|Â
™ð ë
¢ן”ûü)­ ª úúŠ”¤ü*ü‰/ü€:=¬¹ÎØÙÚÛý l}ö,£¤OsStrExtÁD¤Ï$£¥Ö­+£¦Œ‘þM£§üèþ¦£©í룪µ £«üh"ä‡ä²xôÔhøXZGI68¼Ž=D·¸üè ¦¬­¸<«+¬¯ÖL(­+¬°ü)$Mê%¬²Œ‘TSþM¬³Ä*T| õ¬´ã0L£ Ú¬µ<Ž\oq”8bGRTüe!FüŒ 9ü¯N
 
þMþMŒ‘ÿMå“ê%€Nê%è)6{}š~ÉÖ¿Ù¿Ú¿«Û¿ˆÜ¿Ý¿Þ¿ˆ‚†f|Â
ê|™ð Ð
˜üú8<ˆó®
·ü©JÖ¿Ù¿Ú¿«Û¿ˆÜ¿Ý¿Þ¿ˆ‚†f|Â
ê|ê|™ð
¸¼§=D¶ËÌOsStrÁ,ˆ¹º¸<'«+¹¼ÖL0­+¹½ªDTÏ$¹¾ü)$wê%¹ÀŒ‘T}þM¹ÁPathÁ$™…0¹Âü試¹Äí­ë¹Å•STĺ¹Æû÷Ä*Të õ¹ÇÐ0\“ Ù¹Éã0L  Ú¹Ê|\ þä@ñ”bâqÒÔ|ŽÂ£²´¡£´¸”üÔ!~¬ûoq^`ü­Nˆ
 ˆ
·®Ö¿Ù¿Ú¿«Û¿ˆÜ¿Ý¿Þ¿ˆ‚†f|Â
§~™ð Î
˘ü² Z 
 
§~Ö¿Ù¿Ú¿«Û¿ˆÜ¿Ý¿Þ¿ˆ‚†f|Â
·®™ð Ñ 
Ìò.DÇ ÌÁµÍÙµÍöµÍÍÌÍý’€¬À=4ÏÖ×üè ¦ÎÏÖL­+ÎÐü)$Bê%ÎÒŒ‘THþMÎÓÄ*Tq õÎÔã0L˜ ÚÎÕ<z´k”-\<LNüZ! 3ü¤OŠ
 Š
·®Ö¿Ù¿Ú¿«Û¿ˆÜ¿Ý¿Þ¿ˆ‚†f|Â
’€™ð È
Ö˜<¿üÍFÖ¿Ù¿Ú¿«Û¿ˆÜ¿Ý¿Þ¿ˆ‚†f|Â
’€’€™ð
×䨣 îœü¾5£
 
õõ sockaddr_unÁö
sun_familyÁ÷sun_pathÁÍzt„òj\¨r ×
Ù½˜ü°J£Œ
 Œ
·®í» Æ
Ú˜ü¿L£Ö¿Ù¿Ú¿«Û¿ˆÜ¿Ý¿Þ¿ˆ‚†f|Â
ÂuÂu™ð¥ÜÜ™ó Ç­+ÂuL
ÛÂuflagsÁ,Ê(* ÃÛÛ¨rd0<²O0R06090&0)000\ã 00ü/ÿ/í/ð/Þ/á/Ï/Ò/À/Ã/d°µ/¸/¦/©/—/š/ÔëŒ/,~//p/s/]/`/K/N/üÍ4.ü·(% Create a new non-blocking Unix pipe.ÁàúüäNK This is a wrapper around Unix's [`pipe(2)`] system call and can be used asÁü³2/ inter-process or thread communication channel.ÁæúüêPM This channel may be created before forking the process and then one end usedÁü»PM in each process, e.g. the parent process has the sending end to send commandÁÌŒ to the child process.Á¦úüªUR [`pipe(2)`]: https://pubs.opengroup.org/onlinepubs/9699919799/functions/pipe.htmlÁúd„ # EventsÁúü•JG The [`Sender`] can be registered with [`WRITABLE`] interest to receiveÁüàPM [writable events], the [`Receiver`] with [`READABLE`] interest. Once data isÁü±LI written to the `Sender` the `Receiver` will receive an [readable event].Áþúü‚PM In addition to those events, events will also be generated if the other sideÁüÓHE is dropped. To check if the `Sender` is dropped you'll need to checkÁüœKH [`is_read_closed`] on events for the `Receiver`, if it returns true theÁüèMJ `Sender` is dropped. On the `Sender` end check [`is_write_closed`], if itÁü¶OL returns true the `Receiver` was dropped. Also see the second example below.ÁúüŠ$! [`WRITABLE`]: Interest::WRITABLEÁü¯0- [writable events]: event::Event::is_writableÁüà$! [`READABLE`]: Interest::READABLEÁü…/, [readable event]: event::Event::is_readableÁüµ41 [`is_read_closed`]: event::Event::is_read_closedÁüê63 [`is_write_closed`]: event::Event::is_write_closedÁ¡úœ¥ # DeregisteringÁ¹úü½IF Both `Sender` and `Receiver` will deregister themselves when dropped,Áü‡EB **iff** the file descriptors are not duplicated (via [`dup(2)`]).ÁÍúüÑSP [`dup(2)`]: https://pubs.opengroup.org/onlinepubs/9699919799/functions/dup.htmlÁ¥úõ¸úü¼MJ Simple example that writes data into the sending end and read it from theÁ”Š receiving end.ÁúÈÒü©%" use std::io::{self, Read, Write};ÁÏúüÓ-* use mio::{Poll, Events, Interest, Token};ÁÄ use mio::unix::pipe;Ášúüž52 // Unique tokens for the two ends of the channel.ÁüÔ&# const PIPE_RECV: Token = Token(0);Áüû&# const PIPE_SEND: Token = Token(1);Á¢ úü¦ #„òüÊ =: // Create our `Poll` instance and the `Events` container.Áüˆ! £úü©!.+ let mut events = Events::with_capacity(8);ÁØ!úÌÜ! // Create a new pipe.Áüö!2/ let (mut sender, mut receiver) = pipe::new()?;Á©"úü­")& // Register both ends of the channel.Áü×"LI poll.registry().register(&mut receiver, PIPE_RECV, Interest::READABLE)?;Áü¤#JG poll.registry().register(&mut sender, PIPE_SEND, Interest::WRITABLE)?;Áï#úüó#*' const MSG: &[u8; 11] = b"Hello world";Áž$úT¢$¬þü­$&ÀþÔ$úüØ$$éöüý$!«øüŸ%.+ PIPE_SEND => sender.write(MSG)ÁüÎ%52 .and_then(|n| if n != MSG.len() {Áü„&LI // We'll consider a short write an error in thisÁüÑ&KH // example. NOTE: we can't use `write_all` withÁü'0- // non-blocking I/O.ÁüÎ'@= Err(io::ErrorKind::WriteZero.into())Áü(  } else {Áü°(" Ok(())Á
 
ælÈïö Í8ö
÷$Î8
\Ô8üÜJaüÃ9JG Execute an I/O operation ensuring that the socket receives more eventsÁü’:&# if it hits a [`WouldBlock`] error.Á½:ú\Å:ÐßÕ:úüÝ:FC This method is required to be called for **all** I/O operations toÁü¨;LI ensure the user will receive events once the socket is ready again afterÁüù;%" returning a [`WouldBlock`] error.Á£<úü«<-* [`WouldBlock`]: io::ErrorKind::WouldBlockÁÝ<útå<õø<ú<€=ÈÒäŒ=•ö,­= ƒü·=/»ö„ë=×®ì€>›ƒÄ¢> Ñ¿>úüÇ>*' let (sender, receiver) = pipe::new()?;Áö>úüþ>+( // Wait until the sender is writable...Á®?úü¶?B? // Write to the sender using a direct libc call, of course theÁüý?96 // `io::Write` implementation would be easier to use.Á¼»@ let buf = b"hello";Áô×@ let n = sender.try_io(|| {Áüú@30 let buf_ptr = &buf as *const _ as *const _;Áü²AQN let res = unsafe { libc::write(sender.as_raw_fd(), buf_ptr, buf.len()) };Á´ˆB if res != -1 {Áä£B Ok(res as usize)Á„ÄB
} else {ÁüÙBJG // If EAGAIN or EWOULDBLOCK is set by libc::write, the closureÁü¨C0- // should return `WouldBlock` error.ÁüÝC+( Err(io::Error::last_os_error())ÁLD¦DD })?;Áü¨D# eprintln!("write {} bytes", n);ÁÐDúüØD-* // Wait until the receiver is readable...ÁŠEúü’EEB // Read from the receiver using a direct libc call, of course theÁüÜE85 // `io::Read` implementation would be easier to use.ÁÜ™F let mut buf = [0; 512];Áü¹F  let n = receiver.try_io(|| {ÁüÞF30 let buf_ptr = &mut buf as *mut _ as *mut _;Áü–GRO let res = unsafe { libc::read(receiver.as_raw_fd(), buf_ptr, buf.len()) };Á´íGËôäˆHëô„©H‘õü¾HIF // If EAGAIN or EWOULDBLOCK is set by libc::read, the closureÁüŒI0öüÁI+¼öLñI¦DÿIÿöüŒJ" eprintln!("read {} bytes", n);Ád³J¢Ú<ÄJÆ<ÐJÈÒ4ãJŽ
 Ž
ælÖ¿Ù¿Ú¿«Û¿ˆÜ¿Ý¿Þ¿ˆ‚†f|Â
¥™ðöù¥úúù ðJöÍìÀþ êJÍì“ÿ íJ–"ÀþÌ£KÀþ˜"Åþl¯K
øÀþ“ÿ$ñJ± ÷JZ\VXÝKøÁµûÙµûöµûûøûÀþ“ÿ ½øÅþÀþìïK»Ÿ¶Ó Ð >ælýþÿ£¤¥ÿýþü“L‡D–L

 
æl 
„jqœhÈïü ¨Lü
ý$­LÁD»LÙ,ØL‹”LîLüàM‰TãM

 
æl 
„jqœhÈïü ÷Mü
þ$üMÁDŠNÙ,§N‹”L½Nü±O?T´O

 
æl 
„jÈïü ¿Oü
ÿ$ÄOÁDÊO¬¤P»Ÿ¶Œ

>ælƒ !¡!¤!ƒüÀP4,ÃP

 
æl 
îœÖ¿Ù¿Ú¿«Û¿ˆÜ¿Ý¿Þ¿ˆ‚†f|Â
¨r™ð ÉP
$ÎPäåÔPdQÁµÙµöµ³Œ†ìœü»QGt¾Q
˜

 
æl ˜
æLæLçLÊÝéLˆ¦ —óë@M$T
Œ† ÍQ
ƒ$ÒQbufsÁ$ØQdžRƒÁµÙµöµƒà‡ 
æLæLçLÊÝéLˆ¦ —óë@M$TüÓR%,ÖRš
 š
ælÈï ÜR
$áRd”SÁµÙµöµ³Èï´ºS»Ÿ¶ûø>8

¯mˆŠŒ !¡!¤!ŒˆŠü×S4,ÚSœ

 œ
¯m 
† àS
ˆ8$åSäåëSd§TˆÁµÙµöµˆà‡ï‡üÒTGtÕTž
Ÿ
 
 ž
¯m Ÿ
æLæLçLÊÝéLˆ¦ —óë@M$T 
Œ† äT
Š8$éTšˆ$ïTdµUŠÁµÙµöµŠà‡þ‰üêU%,íU¡
 ¡
¯mÈï óU
Œ8$øUd«VŒÁµÙµöµŒâ‹ü™W \ÑVÐßÝVúüáV74 The underlying pipe is **not** set to non-blocking.Á»Ÿ¶IF>ælëüÀW$$ÃWÂmælŽŽ
stdinÁ,ÈWÌùX»Ÿ¶¿¼>æl®+ü™Y*\£Yæl
´%¯Y¼£Z»Ÿ¶0->æl“¬+äÁZLÄZ¢
 ¢
æl ÎZ
$ÏZ̈[»Ÿ¶²¯>æl•°+ì¨[\«[æl
$·[ìÿ[»Ÿ¶!>Ÿn—ëü£\$¦\ælŸn
senderÁ4«\¤÷\»Ÿ¶˜>æl™Ž,ü’]!,•]£
 £
ælÎNÎN¼ ÐN´%ä+ÑNì¼ä+§]òÞ^£
˜ ›]˜
$œ]ìÚ]»Ÿ¶\Y>ælëäþ]$^Ÿnælšš
´%†^l–`»Ÿ¶ÌÉ>înžüç`Büª`85 Set the `Receiver` into or out of non-blocking mode.Á|î`¤
 ¤
înÈïœ þ`œ
$ÿ`
\…aüsaüôaJðëüÃb&Åìîbú\öbÐ߆cúüŽcFžíüÙcLïíüªd%ÆîÔdúüÜd-ƒïŽeút–eõ©eú<±eÈÒä½e•ö,Þe ƒüèe/»ö„œf×®ì±f›ƒÄÓf Ñðfúüøf*Óð§gúü¯g+•ñßgúüçgBØñü®h9¥ò¼ìhèòôˆi‰óü«i3²óüãiQðó´¹jËôäÔjëô„õj‘õüŠkJ¬õüÙk0öüŽl+¼öL¾l¦DÌlÿöüÙl#’÷múü‰m-Í÷»múüÃmE’øün8âøÜÊn¤ùüên Êùüo3õùüÇoR³ú´žpËôä¹pëô„Úp‘õüïpIºûü½q0öüòq+¼öL¢r¦D°rÿöü½r"Èüdär¢Ú<õrÆ<sÈÒ4”s¥
 ¥
înÀþÅþœŸ¥ Ÿ  ¡sœÐÿ ›sáÿ žsòÿÌÔs…€làs
žÀþ“ÿ$¢s± ¨s8:=?ŽtžÁµ¡Ùµ¡öµ¡¡ž¡Àþ“ÿ®Æü t»Ÿ¶%">în£¤¥£¤¥¥£¤üÆt‡DÉt¦
§
 ¦
în §
„jqœhÈï¢ Ût¢
£$àtÁDîtÙ,‹u‹”L¡uü“v‰T–v¨
©
 ¨
în ©
„jqœhÈï¢ ªv¢
¤$¯vÁD½vÙ,Úv‹”Lðvüäw?Tçwª
«
 ª
în «
„jÈï¢ òw¢