| 1 | // auto-generated by: jiff-cli generate shared |
| 2 | |
| 3 | macro_rules! errrust-analyzer cargo jiff-static 0.2.16 shared/util/error/err! { |
| 4 | ($($tt:tt)*) => {{ |
| 5 | crate::shared::util::error::Error::from_args(format_args!($($tt)*)) |
| 6 | }} |
| 7 | } |
| 8 | |
| 9 | pub(craterust-analyzer cargo jiff-static 0.2.16 crate/) use errrust-analyzer cargo jiff-static 0.2.16 shared/util/error/err!; |
| 10 | |
| 11 | /// An error that can be returned when parsing. |
| 12 | #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(Clonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core clone/Clone:, Debugrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/macros/Debug:)] |
| 13 | pub struct Errorrust-analyzer cargo jiff-static 0.2.16 shared/util/error/Error# { |
| 14 | messagerust-analyzer cargo jiff-static 0.2.16 shared/util/error/Error#message.: allocrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc crate/::boxedrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc boxed/::Boxrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc boxed/Box#<str>, |
| 15 | } |
| 16 | |
| 17 | impl Errorrust-analyzer cargo jiff-static 0.2.16 shared/util/error/Error# { |
| 18 | pub(craterust-analyzer cargo jiff-static 0.2.16 crate/) fn from_argsrust-analyzer cargo jiff-static 0.2.16 shared/util/error/impl#[Error]from_args().<'a>(message: corerust-analyzer cargo core https://github.com/rust-lang/rust/library/core crate/::fmtrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/::Argumentsrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Arguments#<'a>) -> Errorrust-analyzer cargo jiff-static 0.2.16 shared/util/error/Error# { |
| 19 | { |
| 20 | use allocrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc crate/::stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/::ToStringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/ToString#; |
| 21 | |
| 22 | let message = message.to_stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[T][ToString]to_string().().into_boxed_strrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[String]into_boxed_str().(); |
| 23 | Errorrust-analyzer cargo jiff-static 0.2.16 shared/util/error/Error# { messagerust-analyzer cargo jiff-static 0.2.16 shared/util/error/Error#message. } |
| 24 | } |
| 25 | } |
| 26 | } |
| 27 | |
| 28 | impl corerust-analyzer cargo core https://github.com/rust-lang/rust/library/core crate/::fmtrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/::Displayrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Display# for Errorrust-analyzer cargo jiff-static 0.2.16 shared/util/error/Error# { |
| 29 | fn fmtrust-analyzer cargo jiff-static 0.2.16 shared/util/error/impl#[Error][Display]fmt().(&self, f: &mut corerust-analyzer cargo core https://github.com/rust-lang/rust/library/core crate/::fmtrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/::Formatterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Formatter#) -> corerust-analyzer cargo core https://github.com/rust-lang/rust/library/core crate/::fmtrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/::Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Result# { |
| 30 | corerust-analyzer cargo core https://github.com/rust-lang/rust/library/core crate/::fmtrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/::Displayrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Display#::fmtrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc boxed/impl#[`Box<T, A>`][Display]fmt().(&self.messagerust-analyzer cargo jiff-static 0.2.16 shared/util/error/Error#message., f) |
| 31 | } |
| 32 | } |