pub enum PolyrelError {
Validation(Cow<'static, str>),
EmptyCalls,
InvalidSignature(Cow<'static, str>),
Serialize(Cow<'static, str>),
Deserialize(Cow<'static, str>),
Http(Cow<'static, str>),
Api {
status: u16,
body: Cow<'static, str>,
},
}Expand description
Error type used by the crate. Error type for payload construction and relayer client operations.
Variants§
Validation(Cow<'static, str>)
Validation failed before a payload or request could be constructed.
EmptyCalls
A crate::NonEmptyCalls collection was constructed from an empty vector.
InvalidSignature(Cow<'static, str>)
A signature was malformed or incompatible with the expected format.
Serialize(Cow<'static, str>)
Serialization into a JSON or wire-format representation failed.
Deserialize(Cow<'static, str>)
Deserialization or DTO-to-domain conversion failed.
Http(Cow<'static, str>)
The underlying HTTP client returned a transport-level error.
Api
The relayer returned a non-success HTTP response.
Implementations§
Source§impl PolyrelError
impl PolyrelError
Sourcepub fn validation<E>(msg: E) -> Self
pub fn validation<E>(msg: E) -> Self
Creates a Self::Validation error.
Sourcepub fn invalid_signature<E>(msg: E) -> Self
pub fn invalid_signature<E>(msg: E) -> Self
Creates an Self::InvalidSignature error.
Sourcepub fn serialize<E>(msg: E) -> Self
pub fn serialize<E>(msg: E) -> Self
Creates a Self::Serialize error.
Sourcepub fn deserialize<E>(msg: E) -> Self
pub fn deserialize<E>(msg: E) -> Self
Creates a Self::Deserialize error.
Trait Implementations§
Source§impl Debug for PolyrelError
impl Debug for PolyrelError
Source§impl Display for PolyrelError
impl Display for PolyrelError
Source§impl Error for PolyrelError
impl Error for PolyrelError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns 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()
Auto Trait Implementations§
impl Freeze for PolyrelError
impl RefUnwindSafe for PolyrelError
impl Send for PolyrelError
impl Sync for PolyrelError
impl Unpin for PolyrelError
impl UnsafeUnpin for PolyrelError
impl UnwindSafe for PolyrelError
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
Mutably borrows from an owned value. Read more