Enum homestar_invocation::error::Error
source · pub enum Error<T> {
CidEncode(Error),
ConditionNotMet(String),
DagCborTranslation(Error),
FromIpld(SerdeError),
InvalidDiscriminant(T),
MissingField(String),
ParseResource(ParseError),
Unknown,
UnexpectedIpldType(Ipld),
Utf8(Utf8Error),
Io(Error),
}Expand description
Generic error type for Invocation use cases.
Variants§
CidEncode(Error)
Error encoding structure to a Cid.
ConditionNotMet(String)
Error thrown when condition or dynamic check is not met.
DagCborTranslation(Error)
Failure to decode/encode from/to DagCbor.
The underlying error is a anyhow::Error, per the DagCborCodec implementation.
FromIpld(SerdeError)
Error converting from [Ipld] structure via serde.
Transparently forwards from [libipld::error::SerdeError]’s source and
Display methods through to an underlying error.
InvalidDiscriminant(T)
Invalid match discriminant or enumeration.
MissingField(String)
Error related to a missing a field in a structure or key in a map.
ParseResource(ParseError)
Error during parsing a Url.
Transparently forwards from url::ParseError’s source and
Display methods through to an underlying error.
Unknown
Generic unknown error.
UnexpectedIpldType(Ipld)
Unexpcted [Ipld] type.
Utf8(Utf8Error)
Error when attempting to interpret a sequence of u8 as a string.
Transparently forwards from std::str::Utf8Error’s source and
Display methods through to an underlying error.
Io(Error)
Propagated IO error.
Implementations§
source§impl<T> Error<T>
impl<T> Error<T>
sourcepub fn unexpected_ipld(ipld: Ipld) -> Self
pub fn unexpected_ipld(ipld: Ipld) -> Self
Return a SerdeError when returning an [Ipld] structure that’s not expected at the call-site.
sourcepub fn not_an_ipld_list() -> Self
pub fn not_an_ipld_list() -> Self
Return an invalid type SerdeError when not matching an expected
[Ipld] list/sequence type.
Trait Implementations§
source§impl<T> Error for Error<T>
impl<T> Error for Error<T>
source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
source§impl<T> From<Error<T>> for InputParseError<T>
impl<T> From<Error<T>> for InputParseError<T>
source§impl<T> From<Infallible> for Error<T>
impl<T> From<Infallible> for Error<T>
source§fn from(err: Infallible) -> Self
fn from(err: Infallible) -> Self
source§impl<T> From<ParseError> for Error<T>
impl<T> From<ParseError> for Error<T>
source§fn from(source: ParseError) -> Self
fn from(source: ParseError) -> Self
Auto Trait Implementations§
impl<T> !RefUnwindSafe for Error<T>
impl<T> Send for Error<T>where
T: Send,
impl<T> Sync for Error<T>where
T: Sync,
impl<T> Unpin for Error<T>where
T: Unpin,
impl<T> !UnwindSafe for Error<T>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> IntoSql for T
impl<T> IntoSql for T
source§fn into_sql<T>(self) -> Self::Expression
fn into_sql<T>(self) -> Self::Expression
self to an expression for Diesel’s query builder. Read moresource§fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression
fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression
&self to an expression for Diesel’s query builder. Read more