pub enum Error<T> {
CidEncode(Error),
ConditionNotMet(String),
DagCborTranslation(Error),
FromIpld(SerdeError),
FromMultibase(Error),
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.
FromMultibase(Error)
Error with a libipld::multibase encoding/decoding.
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
Source§impl<T> From<SerdeError> for Error<T>
impl<T> From<SerdeError> for Error<T>
Source§fn from(source: SerdeError) -> Self
fn from(source: SerdeError) -> Self
Auto Trait Implementations§
impl<T> Freeze for Error<T>where
T: Freeze,
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> AggregateExpressionMethods for T
impl<T> AggregateExpressionMethods for T
Source§fn aggregate_distinct(self) -> Self::Outputwhere
Self: DistinctDsl,
fn aggregate_distinct(self) -> Self::Outputwhere
Self: DistinctDsl,
DISTINCT modifier for aggregate functions Read moreSource§fn aggregate_all(self) -> Self::Outputwhere
Self: AllDsl,
fn aggregate_all(self) -> Self::Outputwhere
Self: AllDsl,
ALL modifier for aggregate functions Read moreSource§fn aggregate_filter<P>(self, f: P) -> Self::Output
fn aggregate_filter<P>(self, f: P) -> Self::Output
Source§fn aggregate_order<O>(self, o: O) -> Self::Outputwhere
Self: OrderAggregateDsl<O>,
fn aggregate_order<O>(self, o: O) -> Self::Outputwhere
Self: OrderAggregateDsl<O>,
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> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for 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