Sha256: 1da6748767b9a5b25ad7c013becb2e243b39c7c764cbdf00487794f6fc812890
Contents?: true
Size: 444 Bytes
Versions: 8
Compression:
Stored size: 444 Bytes
Contents
use core::fmt::Debug; use thiserror::Error; #[derive(Error, Debug)] #[error("error")] struct Error<'a>(#[from] Inner<'a>); #[derive(Error, Debug)] #[error("{0}")] struct Inner<'a>(&'a str); #[derive(Error, Debug)] enum Enum<'a> { #[error("error")] Foo(#[from] Generic<&'a str>), } #[derive(Error, Debug)] #[error("{0:?}")] struct Generic<T: Debug>(T); fn main() -> Result<(), Error<'static>> { Err(Error(Inner("some text"))) }
Version data entries
8 entries across 8 versions & 1 rubygems