Struct libipld_core::error::TypeError
source · pub struct TypeError {
pub expected: TypeErrorType,
pub found: TypeErrorType,
}
Expand description
Type error.
Fields§
§expected: TypeErrorType
The expected type.
found: TypeErrorType
The actual type.
Implementations§
source§impl TypeError
impl TypeError
sourcepub fn new<A: Into<TypeErrorType>, B: Into<TypeErrorType>>(
expected: A,
found: B
) -> Self
pub fn new<A: Into<TypeErrorType>, B: Into<TypeErrorType>>(
expected: A,
found: B
) -> Self
Creates a new type error.
Trait Implementations§
source§impl Error for TypeError
impl Error for TypeError
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()