Files
boc/aamos-ledger-rust/target/debug/deps/libthiserror-ab729f72934e5d2c.rmeta
T

57 lines
23 KiB
Plaintext
Raw Normal View History

rust
bZ#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Áthiserror_implÁ}%QÐÄ`‚’g(æp}#-cb822d405da50030ÁprovideÁ<ãDerror_generic_member_accessÁÜÁDAThiserrorProvideÁ„‹GܾFÀaserrorÁ
AsDynErrorÁ'aÁ as_dyn_errorÁ   ¥ 
 
 SealedÁ¥    " displayÁ$$$$$$ AsDisplayÁ* *å*
as_displayÁ$. .¥.å.Œ $3 3å3Œ $7 7å7Œ $ˆ
$<¥$$ __privateÁAA





.
<
*;¥¾¾Ìì¾ Ìì¾ Ì쫽¥Û
õ
º* 8¥ *…0…0PathÁ†0innerÁß-bªŸðcÂ^*€/€/PathBufÁ/Äß-1ùjÝÜ»€; 
;­;ð
¾¾¾¾¾¾ ¾"¾.
3…07€/<
>…0?€/T*;$AÀErrorÁýç6ÈžGüš [![github]](https://github.com/dtolnay/thiserror)&ensp;[![crates-io]](https://crates.io/crates/thiserror)&ensp;[![docs-rs]](https://docs.rs/thiserror)ÁúüŸjg [github]: https://img.shields.io/badge/github-8da0cb?style=for-the-badge&labelColor=555555&logo=githubÁüŠnk [crates-io]: https://img.shields.io/badge/crates.io-fc8d62?style=for-the-badge&labelColor=555555&logo=rustÁüùmj [docs-rs]: https://img.shields.io/badge/docs.rs-66c2a5?style=for-the-badge&labelColor=555555&logo=docs.rsÁçú <br>ÁôúüøNK This library provides a convenient derive macro for the standard library'sÁüÇ  [`std::error::Error`] trait.ÁèúüìOL [`std::error::Error`]: https://doc.rust-lang.org/std/error/trait.Error.htmlÁ¼úÉú
# ExampleÁÛú ```rustÁ”ë # use std::io;ÁÌþ use thiserror::Error;Á˜úÜœ #[derive(Error, Debug)]Áì¸ pub enum DataStoreError {ÁüÖ+( #[error("data store disconnected")]Áü‚&# Disconnect(#[from] io::Error),Áü©;8 #[error("the data for key `{0}` is not available")]ÁÔå Redaction(String),Áü€KH #[error("invalid header (expected {expected:?}, found {found:?})")]Á¼Ì InvalidHeader {Áìä expected: String,ÁÔ‚  found: String,ÁT  },Áü¨ ,) #[error("unknown data store error")]Á„Õ
Unknown,Á ```Áô ú
úl…
# DetailsÁ
úü—
LI - Thiserror deliberately does not appear in your public API. You get theÁüä
OL same thing as if you had written an implementation of `std::error::Error`Áü´ NK by hand, and switching from handwritten impls to thiserror or vice versaÁüƒ  is not a breaking change.Á£ úü§ LI - Errors may be enums, structs with named fields, tuple structs, or unitÁ structs.Áƒ
úü‡
A> - A `Display` impl is generated for your error if you provide矃
OL `#[error("...")]` messages on the struct or each variant of your enum, asÁü™! shown above in the example.Á»úü¿OL The messages support a shorthand for interpolating fields from the error.Áúü“DA - `#[error("{var}")]`&ensp;⟶&ensp;`write!("{}", self.var)`ÁüØ@= - `#[error("{0}")]`&ensp;⟶&ensp;`write!("{}", self.0)`Áü™HE - `#[error("{var:?}")]`&ensp;⟶&ensp;`write!("{:?}", self.var)`ÁüâDA - `#[error("{0:?}")]`&ensp;⟶&ensp;`write!("{:?}", self.0)`Á§úü«LI These shorthands can be used together with any additional format args,Áüø63 which may be arbitrary expressions. For example:Á¯ú
```rustÁ´Á # use core::i32;ÁìØ # use thiserror::Error;Áìþ #[derive(Error, Debug)]Á´œ pub enum Error {Áü³PM #[error("invalid rdo_lookahead_frames {0} (expected < {})", i32::MAX)]Áü„  InvalidLookahead(u32),ÁL­ ```Á·úü»PM If one of the additional expression arguments needs to refer to a field ofÁüŒOL the struct or enum, then refer to named fields as `.var` and tuple fieldsÁ as `.0`.Áëúª'ìýß'<…(ü£+( # fn first_char(s: &String) -> char {ÁüÏ%" # s.chars().next().unwrap()Á # }Á<ÿ…(ć # #[derive(Debug)]Á¼  # struct Limits {Á´¸ # lo: usize,Á´Ï # hi: usize,Áê,…(ìø•(´–»(ü­QN #[error("first letter must be lowercase but was {:?}", first_char(.0))]Áäÿ WrongCase(String),Áüœfc #[error("invalid index {idx}, expected at least {} and at most {}", .limits.lo, .limits.hi)]Áüƒ52 OutOfBounds { idx: usize, limits: Limits },ÁÞ)î)ËúüÏKH - A `From` impl is generated for each variant that contains a `#[from]`Á„›
attribute.Á¬úü°NK The variant using `#[from]` must not contain any other fields beyond theÁüÿHE source error (and possibly a backtrace &mdash; see below). UsuallyÁüÈMJ `#[from]` fields are unnamed, but `#[from]` is allowed on a named fieldÁT too.Á¡úª'ü³'$ # use core::fmt::{self, Display};Á¤Û # use std::io;Áìðß'…(¬– # mod globset {Áü¬.+ # #[derive(thiserror::Error, Debug)]ÁÜÛ # #[error("...")]Áì÷ # pub struct Error;ÁL•ê,…(ì§•(ÄÅ pub enum MyError {ÁüÞ  Io(#[from] io::Error),Áüÿ'$ Glob(#[from] globset::Error),ÁÞ)…(ü· " # impl Display for MyError {ÁüÚ JG # fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result {Áü¥!  # unimplemented!()ÁlÆ!
# }ÁLÔ!ê,LÞ!î)è!úüì!LI - The Error trait's `source()` method is implemented to return whicheverÁü¹"MJ field has a `#[source]` attribute or is named `source`, if any. This isÁü‡#NK for identifying the underlying lower level error that caused your error.ÁÖ#úüÚ#PM The `#[from]` attribute always implies that the same field is `#[source]`,Áü«$85 so you don't ever need to specify both attributes.Áä$úüè$PM Any error type that implements `std::error::Error` or dereferences to `dynÁü¹%/, std::error::Error` will work as a source.Áé%úlí%ª'üû%'±4ì£&ß'<Á&…(ìÉ&•(Ôç& pub struct MyError {Á´‚' msg: String,Áü™':7 #[source] // optional if field name is `source`ÁüÔ'  source: anyhow::Error,Á<õ'Þ)<ý'…(ü…("ï7ü¨(J8üó( ï8l”)˜9L¢)ê,L¬)î)¶)úüº)NK - The Error trait's `provide()` method is implemented to provide whicheverÁü‰*63 field has a type named `Backtrace`, if any, as aÁüÀ*IF `std::backtrace::Backtrace`. Using `Backtrace` in errors requires aÁüŠ+74 nightly compiler with Rust version 1.73 or newer.ÁÂ+úlÆ+ª'üÔ+)& # const IGNORE: &str = stringify! {Áüþ+$! use std::backtrace::Backtrace;Á£,úì§,•(ÔÅ,ç>´à,Š?ü÷,:7 backtrace: Backtrace, // automatically detectedÁ<²-Þ)Tº- # };ÁLÅ-î)Ï-úüÓ-HE - If a field is both a source (named `source`, or has `#[source]` orÁüœ.IF `#[from]` attribute) *and* is marked `#[backtrace]`, then the ErrorÁüæ.OL trait's `provide()` method is forwarded to the source's `provide` so thatÁü¶/KH both layers of the error share the same backtrace. The `#[backtrace]`Áü‚0LI attribute requires a nightly compiler with Rust version 1.73 or newer.ÁÏ0úlÓ0ª'üá0)ËCì‹1•(Ä©1Ú6tÂ1 Io {ÁÔÑ1 #[backtrace]Áüì1  source: io::Error,Ád2 },Á<š2Þ)T¢2«EL­2î)·2úü»2MJ - For variants that use `#[from]` and also contain a `Backtrace` field, aÁü‰385 backtrace is captured from within the `From` impl.ÁÂ3úlÆ3ª'üÔ3)ËCìþ3•(Äœ4Ú6tµ4¼I¬Ä4 #[from]ÁüÚ4 ÷Iüû4# backtrace: Backtrace,ÁdŸ5 J<¬5Þ)T´5«EL¿5î)É5úüÍ5KH - Errors may use `error(transparent)` to forward the source and DisplayÁü™6GD methods straight through to an underlying error without adding anÁüá6JG additional message. This would be appropriate for enums that need anÁô¬7 "anything else" variant.ÁË7úLÏ7î)ìÙ7ß'<÷7…(ìÿ7•(Ä8Ú6t¶8 # /*ÁlÅ8
...ÁtÓ8 # */Áâ8úüæ8 #[error(transparent)]Áü†9XU Other(#[from] anyhow::Error), // source and Display delegate to anyhow::ErrorÁ<ß9Þ)Lç9î)ñ9úüõ9C@ Another use case is hiding implementation details of an errorÁü¹:OL representation behind an opaque error type, so that the representation isÁü‰;=: able to evolve without breaking the crate's public API.ÁÇ;úLË;î)ìÕ;ß'<ó;…(üû;GD // PublicError is public, but opaque and easy to keep compatible.ÁìÃ<•(Üá< #[error(transparent)]Áüý<0- pub struct PublicError(#[from] ErrorRepr);Á®=úIJ= impl PublicError {ÁüË=B? // Accessors for anything we do want to expose publicly.Á<Ž>Þ)>úüš>FC // Private and free to change across minor version of the crate.Áìá>•(´ÿ> enum ErrorRepr {Át?ÄPl¥?ÛPt³?ñP<Â?Þ)LÊ?î)Ô?úüØ?OL - See also the [`anyhow`] library for a convenient single error type to useÁÔ¨@ in application code.ÁÃ@úüÇ@30 [`anyhow`]: https://github.com/dtolnay/anyhowÁ https://docs.rs/thiserror/1.0.69ÁlƒA$AÀ8ÆMÈ@888\¡D<¥D
UnwindSafeÁT«½Æ,-¾¼%Œ!üD 4;TN ÎìüDU®]4^¦]#¸]¦]-¸]$Yük,dnD D®] D¾  {
®]$|ü›,
¥ 
꓃
¤¾É
É
 ¯É
  24
üÜ+E 

  ì
 É
ü *Û
¥üß+F 
a
 ï