Files
archy/core/target/debug/deps/libpin_utils-32455b7bbb55cc9a.rmeta
T

54 lines
9.4 KiB
Plaintext
Raw Normal View History

2026-01-24 22:59:20 +00:00
rust
õ##rustc 1.93.0 (254b59607 2026-01-19)Á³VOÐêùÿ²?ÑL¼§Ì±-a7a40eb546f9e2b0Áë&Gf·Ã ¬ëñq:¤»b-bb76018b1173caf6Á³
core_reexportÁ stack_pinÁpin_mutÁ
projectionÁïunsafe_unpinnedÁ³Â<†ïè üÅÌ Utilities for pinningÁ¡ ˜ Ê8¹l™ §7https://docs.rs/pin-utils/0.1.0Áü©!ü’:³ÂÂÂïÀè¾ öøú¬Ý¡Ð Ó Ú8°â =¡>‡assert_matchesÁu‰@‡©ï%B‡­ÖEÒD‡¯¦MŸF‡³¨%ŒL‡Ðÿ±L‡ÁÕL‡´ùL‡·numÁ”M‡¼²%ÏM‡²  UÝM‡Ê memÁñM‡Õ profilingÁM¾N‡ã÷ ÑN‡êÄM‘O‡borrowÁ5ÁO‡¥È-ÑO‡»ÐàO‡ª=íO‡Ò>=þO‡ÂerrorÁ-P‡Èö-žP‡Þ
5­P‡ÑÞ ½P‡Á÷÷P‡ã#ƒ-„Q‡¨$asciiÁ-“Q‡™)šM¢Q‡æ)
async_iterÁUîQ‡“*bstrÁ%²R‡Ë*cellÁ%ÀR‡¸+À%ÎR‡Ž/ºÜR‡†1ioÁ©S‡²2£ %µS‡î2netÁÃS‡öNä 5ÐS‡íQosÁàS‡ïSõ -ìS‡…T¡ MûS‡©U§ ÌT‡ÑU¸ ÙT‡ëUrandomÁ5˜U‡WrangeÁ-áU‡¬WÛ
5ðU‡YÂ%€V‡ÒZ
unsafe_binderÁmÈV‡¾]ÍàV‡Á]¢%íV‡‡bî-ûV‡ªcœŠW‡stimeÁ%—W‡»zwtf8Á%¦W‡«{unicodeÁ=µW‡”|5ÓW‡»|taskÁ%ãW‡Ó}á-«X‡þ~ primitiveÁMÃY‡Å€archÁ%ú^‡Ñ‚%ðc‡ŽŒõ  tM
u assert_neÁM¨ v debug_assertÁeþS ydebug_assert_eqÁ}æ[ zdebug_assert_neÁ}Ùc {matchesÁ=‰} }6-Ä‘ ~writeÁ-¦ª writelnÁ=þ± ß]¹Á 
unimplementedÁmöÖ todoÁ%ÿè ƒémËø â]”‘ ˆã• åu—š ˆÒ´¦ å U޲ Šðe•¹ ï5œ¿ ŒÈ %óÆ ä5‘Ò ŽÀ%à µM„æ ó]­ð ñmùú é
]€ ¢°‰ ð=ž¢ 5Õí ˜å U„ñ õeŸô š²UøF‡x¼ËI‡ŒÂÏI‡”ŒÈÔI‡—ŒÎÙI‡šŒ˜ -ÞI‡ Œ¦åI‡¯Œ¬éI‡¦Œ²îI‡©Œ¸óI‡¬Œ-øI‡²ŒÔ%ÞK‡‘Œ¾%äK‡£Œassert_unsafe_preconditionÁÕºHimpl_partial_eqÁ}¿Þ*impl_partial_eq_ordÁéà*impl_partial_eq_nÁâ*° ÀÙU$¤ùô Pins a value on the stack.ÁËl#
# ExampleÁ1Ë\5 ```rustÁìA # use pin_utils::pin_mut;ÁÌ_ # use core::pin::Pin;Áœy # struct Foo {}Áü  let foo = Foo { /* ... */ };Á”® pin_mut!(foo);ÁüÁ let _: Pin<&mut Foo> = foo;Á ```Á&|é Ž ÷  ¨,   Ÿ, 8 ˜& 8Û$  
¡, £ ¤ ¦$ ¥- §*ª ­ õ, ¯ ° ò8ï8ó, ÷8Ë ø ú, ü8Ë ý% þ+ ì í ÿ8è ó þ8
unused_mutÁ88, 8Ë  8"4  ë , «8'±8š'À8¸ Â'Å8PinÁÇ'Ê8   Ù á Ú8Û, ß8Ë à% ì
óÔÃü*' A pinned projection of a struct field.Á+Ëd/ # SafetyÁ<Ëü@C@ To make using this macro safe, three things need to be ensured:Áü„NK - If the struct implements [`Drop`], the [`drop`] method is not allowed toÁüÓ" move the value of the field.ÁüöPM - If the struct wants to implement [`Unpin`], it has to do so conditionally:ÁüÇOL The struct can only implement [`Unpin`] if the field's type is [`Unpin`].Áü—/, - The struct must not be `#[repr(packed)]`.ÁÇËÙË©üé! use pin_utils::unsafe_pinned;ÁÜ‹ use std::marker::Unpin;Á´§ use std::pin::Pin;Á¾ËœÂ struct Foo<T> {ÁŒÖ field: T,Áîˤò impl<T> Foo<T> {Áü‡! unsafe_pinned!(field: T);Á©Ëü­*' fn baz(mut self: Pin<&mut Self>) {ÁüØOL let _: Pin<&mut T> = self.field(); // Pinned reference to the fieldÁ¡$¸Ëü¼@= impl<T: Unpin> Unpin for Foo<T> {} // Conditional Unpin implÁËü‰JG Note: borrowing the field multiple times requires using `.as_mut()` toÁôÔ avoid consuming the `Pin`.ÁóËü÷" [`Unpin`]: core::marker::UnpinÁÄš [`drop`]: Drop::dropÁ&|³ Þ Û  ä ñ , å8þ æ& ç8è& ê, ì8 í& î8ï*ó ö Ù +   8è,   8 unsafe_codeÁ\ˆ 8 ž , ¡ 8þ ¢  £ :'__aÁ ¨  ©  õ 8& » , ½ 8'à 8š'Ò 8¸ Ô '× 8ÈÙ  Ü  Ý :Ï*8ã 8 ë (÷ , ú 8'
8šl
'
8¸ 
'
8È

 š
:Ï*$
8 
, ¤
8¸) ¥
 ¦
 ¨
 Ó 8"
 ½
 É  , Ï
8
'Õ
8šl×
'ä
8¸ æ
'é
8Èë
'î
8map_unchecked_mutÁŒð
  »  8$— $  8Ë ž  Ÿ  ¡ 8¢ 8Ë ¦  § , ¨ 8þ © ä›üÞ -* An unpinned projection of a struct field.ÁŒ Ëd ÷ Ëü¡ JG This macro is unsafe because it creates a method that returns a normalÁüì OL non-pin reference to the struct field. It is up to the programmer to ensureÁü¼
HE that the contained value can be considered not pinned in the currentÁd… context.ÁËl–¤Ë©ü´# use pin_utils::unsafe_unpinned;Á´ØÄ#ïË struct Bar;Á„ƒ
struct Foo {Áœ” field: Bar,Á¡$®Ë impl Foo {ÁüÁ%" unsafe_unpinned!(field: Bar);ÁçËüë*‹%ü–LI let _: &mut Bar = self.field(); // Normal reference to the fieldÁ•&¡$ûËüÿJœ'üÊ  avoid consuming the [`Pin`].ÁëËÜï [`Pin`]: core::pin::PinÁ&|. ¸ ç ¾ Ë , ¿8þ À& Á8Â& Ä, Æ8¸) Ç& È8É*Í Ð å+ Ú Û î8è á í8–*8 ø, û8þ ü ý:Ï*  ƒ Ï8$& , 8,˜'8š'¬8¸ ®'±8ȳ  ·:Ï*$¸8½8 Å(Ñ Ô:Ï*8Ú, Þ8¸) ß á ß8" ö Õ ˆ8, 8'8šl•'¢8¸ ¤'§8È©'¬8get_unchecked_mutÁŒ® ¿ Ä8 Å, Æ8þ ÇUnpinÁ
Drop::dropÁ³core::pin::PinÁ² µcore::marker::UnpinÁDropÁ core::markerÁ core::pinÁȇ;åâ³¥;˜²‘;²Â;åâè;ÑÚ;ù;ȇ;‘; ³¥;²Â;Ú;è;ù;ëUÈþޣÞÉôñú÷Ä ÞáæòJ©K·J®JÞK¨â©âåâ™Ct©¬Ûê´T¸÷³Ôš]ìyÒ|[óìz'gP¬F/3&jIÝõ¸¯¢¡†®`ÝÎIJoIÌÓ<O˾G+È`d>„ì¿-p?È Ô
'3'ƒ"¼-Ð /)))»,Î 
-k:öúüÀ Ä Ð #/ø(Ê 
)hþ¹&È 'ˆ‹’–ª®¾ÌÝä
l"%ã ™Ct©¬8šøZÃ`*”n $ ( I 9 ^ €ODHT
·ÞÈ`d>„ì yÒ|[óìz'¸÷³Ôš]ìO˾G+&jIÝõ¸ÎIJoIÌÓ<™Ct©¬8¤Ûê´TgP¬F/3¯¢¡†®`Ývÿÿvÿÿÿ\ÿ*nvÿÿvÿÿÿ\ÿ*nc/Users/tx1138/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/pin-utils-0.1.0/src/stack_pin.rsÁ ¡ñ—çH ‘²Ã9mR[Œùù ! "5MD Pªn*gL韸}ô%,@d/Users/tx1138/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/pin-utils-0.1.0/src/projection.rsÁ Oòs$´'щ]~=ÆzIééd+
DO#QP0 ""+P
AK#B=D(
.
KPI
 $&+M