Files
boc/aamos-ledger-rust/target/debug/deps/libatoi-e16eb95d0fe02fb3.rmeta
T

68 lines
32 KiB
Plaintext
Raw Normal View History

rust
ë|#rustc 1.96.0 (ac68faa20 2026-05-25)ÁíàÄTËŸ ÜJîÄ)'ß\¥!-3d1337db07d0b3aeÁ
num_traitsÁ•Œn[BÆoìwÁ–~Ô=ió-068418e218eec3bcÁÀ뉊]!ÜÛê(¹Þ—šên-5be7b69c3ff7b5b8Á¤²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Á$»¹$°¹í 
  
atoiÁš FromRadix10Á
from_radix_10ÁFromRadix10CheckedÁfrom_radix_10_checkedÁ FromRadix16Á
from_radix_16ÁFromRadix16CheckedÁfrom_radix_16_checkedÁFromRadix10SignedÁfrom_radix_10_signedÁFromRadix10SignedCheckedÁ!from_radix_10_signed_checkedÁ MaxNumDigitsÁ#max_num_digitsÁ#max_num_digits_negativeÁ&š&µ &Ê ascii_to_digitÁ*š,š,/š/Å
1 1 4š4ÿ
6 6 6 6 6 6 =š=? ? ascii_to_hexdigitÁBšDšDä GšG
I I LªLsignumÁNšnthÁPšSignÁRPlusÁS
RMinusÁU
 Xƒ
 [× 
^`Ö





"
.
1
6
?
F
I
Y
\
\
\
_
_
a
!##šÁÁ!ÁÁÁÁÛRSTUV¢ƒÇ½®s?ØŠ ¿cÐìµß&,/4=DGWRXRZR[R]R^R`R#1!ÛØŠ ¿cÐìµß!#*BPRí
CheckedAddÁTê°
CheckedMulÁTöµBoundedÁ<‡b
CheckedSubÁT³OneÁœÓ SignedÁ4¡œ
ZeroÁ$©Ä maxÁÈ ÎminÁÍ Å AddAssignÁLÝÙõ DivAssignÁLè¢÷ MulAssignÁLóßö SubAssignÁLþœöüÂÅü]Z A crate for parsing integers directly from ASCII (`[u8]`) without encoding them into utf8Áü^96 first. The name is inspired by the famous C function.Á˜úüœ+( Using `str::from_utf8` and `str::parse`ÁüÈ`] is likely to be more idiomatic. Use this crate if you want to avoid decoding bytes into utf8Áü©# (e.g. for performance reasons).ÁÍúüÑVS Note that if you want to know how much of the input has been used, you can use theÁü¨%" `FromRadix10` trait, for example:ÁÎú ```rustÁÔÞ use atoi::FromRadix10;ÁùúüýDA /// Return the parsed integer and remaining slice if successful.ÁüÂLI fn atoi_with_rest<I: FromRadix10>(text: &[u8]) -> ((&[u8], Option<I>)) {Áü&# match I::from_radix_10(text) {Áü¶# (_, 0) => (text, None),ÁüÚ2/ (n, used) => (&text[used..], Some(n)),ÁL,—< ```Á!#*BPRíTK°¤@µÁ8bÚ-³÷)Ó "œ
¦Ä ½ ÎÓ Åé Ùõ¢÷£÷ßöÀíœöORUôÉFI/2õøâåÑÔÉ̹¼ü¶$¨«z}cfü¤OüŽ# Parses an integer from a slice.Á²úü¶`] Contrary to its 'C' counterpart atoi is generic and will require a type argument if the typeÁü— a^ inference can not determine its result. It will also check for overflow / underflow and allowÁ for Signs.Áˆ
úüŒ
a^ Use [`FromRadix10`] or [`FromRadix10Checked`] directly if you do not want to allow signs. UseÁüî
b_ [`FromRadix10`] or [`FromRadix10Signed`] if you want to opt out overflow / underflow checking.ÁÑ ú
# ExampleÁã ú ³œï  use atoi::atoi;Áüƒ %" // Parsing to digits from a sliceÁü© -* assert_eq!(Some(42), atoi::<u32>(b"42"));Áü× b_ // Additional bytes after the number are ignored. If you want to know how many bytes were usedÁüº
<9 // to parse the number use `FromRadix10::from_radix_10`.Áü÷
`] assert_eq!(Some(42), atoi::<u32>(b"42 is the answer to life, the universe and everything"));ÁüØB? // `None` is returned if the slice does not start with a digitÁü›HE assert_eq!(None, atoi::<u32>(b"Sadly we do not know the question"));Áüä2/ // While signed integer types are supported...Áü—-* assert_eq!(Some(42), atoi::<i32>(b"42"));ÁÌÅ // Signs are allowed.Áüß/, assert_eq!(Some(-42), atoi::<i32>(b"-42"));Áü  // Leading zeros are allowedÁü°/, assert_eq!(Some(42), atoi::<u32>(b"0042"));Áüà# // Overflows will return `None`Áü„)& assert_eq!(None, atoi::<u8>(b"256"));Á³ú # ReturnÁÇúüËXU Returns a a number if the slice started with a number, otherwise `None` is returned.Á$«b b
Û¼ݼÞ¼©ß¼à¼ÛἈcSñŸ«‡zÙÁš ¹ÍìÁ °!ÁÄÚ
ÁtextÁ$³%'äÕüö^[ Types implementing this trait can be parsed from a positional numeral system with radix 10ÁÍì·0·0üî,üø#Ä ú×#ºú³ÔΧüí%¢$ü—2/ assert_eq!((42,2), u32::from_radix_10(b"42"));ÁüÎ41 // Additional bytes after the number are ignoredÁü‡eb assert_eq!((42,2), u32::from_radix_10(b"42 is the answer to life, the universe and everything"));ÁüñA> // (0,0) is returned if the slice does not start with a digitÁü·PM assert_eq!((0,0), u32::from_radix_10(b"Sadly we do not know the question"));ÁüŒ2Â(üÃ2/ assert_eq!((42,2), i32::from_radix_10(b"42"));Áüú<9 // Signs are not allowed (even for signed integer types)Áü»2/ assert_eq!((0,0), i32::from_radix_10(b"-42"));Áüò *ü—41 assert_eq!((42,4), u32::from_radix_10(b"0042"));Á³Üúê+õúüý`] Returns a tuple with two numbers. The first is the integer parsed or zero, the second is theÁüâ\Y index of the byte right after the parsed number. If the second element is zero the sliceÁüÃ&# did not start with an ASCII digit.Álñc cŠ.¿0 
¿0 ÿüÎ )üž_\ Types implementing this trait can be parsed from a positional numeral system with radix 10.ÁüþOL Acts much like `FromRadix10`, but performs additional checks for overflows.Á”Ø Îì¿0üÎ ¿0Ë;&Ý;Ë;0Ý;%ü­,<üþ #Ħ!úl®!×#À!ú<È!³üÔ!! use atoi::FromRadix10Checked;Áüú!%¢$ü¤"@= assert_eq!((Some(42),2), u32::from_radix_10_checked(b"42"));Áüé"4Š1ü¢#sp assert_eq!((Some(42),2), u32::from_radix_10_checked(b"42 is the answer to life, the universe and everything"));Áüš$A·2üà$^[ assert_eq!((Some(0),0), u32::from_radix_10_checked(b"Sadly we do not know the question"));ÁüÃ%2Â(üú%@= assert_eq!((Some(42),2), i32::from_radix_10_checked(b"42"));Áü¿&<¥4ü€'@= assert_eq!((Some(0),0), i32::from_radix_10_checked(b"-42"));ÁüÅ' *üê'B? assert_eq!((Some(42),4), u32::from_radix_10_checked(b"0042"));Áü±(&# // Overflow is indicated by `None`ÁüÜ(=: assert_eq!((None, 3), u8::from_radix_10_checked(b"256"));Á<ž)³ª)úd²)ê+Ã)úüË)]Z Returns a tuple with two numbers. The first is the integer parsed or zero if no digit hasÁü­*]Z been found. None, if there were too many, or too high dighits and the parsing overflowed.Áü+_\ The second is the index of the byte right after the parsed number. If the second element isÁüó+52 zero the slice did not start with an ASCII digit.Á¬°,d dŠ.Û¼ݼÞ¼©ß¼à¼ÛἈcSñŸ«‡zÙ¿0Å9 É,
¿0 Æ,äÌ-üí,^[ Types implementing this trait can be parsed from a positional numeral system with radix 16Á\Ö-·0,ã-·0·0üÂ7,üï-#Ä—.úlŸ.×#±.ú<¹.³ÔÅ. use atoi::FromRadix16;Áüä.%¢$üŽ/2/ assert_eq!((42,2), u32::from_radix_16(b"2a"));ÁüÅ/4Š1üþ/eb assert_eq!((42,2), u32::from_radix_16(b"2a is the answer to life, the universe and everything"));Áüè0A·2ü®1PM assert_eq!((0,0), u32::from_radix_16(b"Sadly we do not know the question"));Áüƒ22Â(üº22/ assert_eq!((42,2), i32::from_radix_16(b"2a"));Áüñ2<¥4ü²32/ assert_eq!((0,0), i32::from_radix_16(b"-2a"));Áüé3 *üŽ441 assert_eq!((42,4), u32::from_radix_16(b"002a"));ÁüÇ4 // so are uppercase lettersÁüë441 assert_eq!((42,4), u32::from_radix_16(b
ò. ˆ‚¢w$·‚Ë}Æ‚°~LÔ‚Ã~Lè‚ýLü‚°ÁTƒ³ÁT¥ƒµÁTºƒ#ÁdσÁ6"6wyüãƒEäæƒk kŠ.Ž.Å94 ‰„4
6Á˜.$ƒ„<´…6ž€7¶€7Ó€7767Áù4ã…6ž€8¶€8Ó€8868Á¢ƒîŽ6ž€9¶€9Ó€9969ÁÁŽ.½6ž€:¶€:Ó€::6:Áº‡ ÁÝ—6ž€;¶€;Ó€;;6;Áº‡¬˜6ž€<¶€<Ó€<<6<Áº‡ ˆü‘špš>>ò. –š¢w$¿šË}ÆšÁ\Ìš¤„TÚš„„Tçš´„dôšÁ??JLüˆ›;¬‹›l lŠ.‹…= §›=
?Á˜.$¡›þž?ž€@¶€@Ó€@@?@Áº‡ÅŸ?ž€A¶€AÓ€AA?AÁº‡ ˆü‹¡LŒŽ¡‹.Ž.šCCò.  ¡¢w$Ì¡Ë}Ó¡
BÁâ|L£¡%'üœ¦JšEEò. ¡¦¢w$æË}ʦ°~LЦÃ~LܦÁFF02üí¦.lð¦m mŠ.œD „§D
FÁ˜.$þ¦üˆªpšHHò. ª¢w$¶ªË}½ªÁ\꤄TѪ„„TÞª´„dëªÁIIJLüÿª;¬‚«n nŠ.‹…G ž«G
IÁ˜.$˜«ø®Iž€J¶€JÓ€JJIJÁº‡¿¯Iž€K¶€KÓ€KKIKÁº‡ ˆLرMNüœ´)üè±41 Trys to convert an ascii character into a `Sign`Á¡²úl©²×#»²ú<ò³œÏ² use atoi::Sign;Áüç²74 assert_eq!(Some(Sign::Plus), Sign::try_from(b'+'));Áü£³85 assert_eq!(Some(Sign::Minus), Sign::try_from(b'-'));Áüà³+( assert_eq!(None, Sign::try_from(b'1'));Á<´³D£´‹.ƒ‚LL
MbyteÁ$¬´üúµ8üÖµ Returns either `+1` or `-1`Á4ÁLšOOLò. ˆ¶œÁ4«¶
NÁ$‹¶$&ü¡¸.¤¸‹.ÁšQQò. ¨¸¢w$ĸË}˸
PÁ¹ «¸%'l°±üܰ&# Representation of a numerical signÁ$¹±ƒÇ½®s?STUVTV$ıRRRR,αRRRR(Œ±04YÙYLNo o„XŒ±X
Y“±(™±\Àc\ "pqr p„ q c cˆ¢cµ
 `£cbufÁ `àB¤GS
rÖ¿Ù¿Ú¿«Û¿ˆÜ¿Ý¿Þ¿ˆ‚†f|Â
ŸÈŸÈ ÈErrorÁ O˜éBL[™±[
\8±?H ±_·ß_46st s„ t„^ ±^
_¹