pub struct HostAbiError {
pub code: Option<String>,
pub message: String,
}Expand description
Error object returned by the host ABI envelope.
Fields§
§code: Option<String>§message: StringImplementations§
Source§impl HostAbiError
impl HostAbiError
Sourcepub fn new(message: impl Into<String>) -> Self
pub fn new(message: impl Into<String>) -> Self
Creates an error without a machine-readable code.
Sourcepub fn with_code(code: impl Into<String>, message: impl Into<String>) -> Self
pub fn with_code(code: impl Into<String>, message: impl Into<String>) -> Self
Creates an error with both code and message.
Sourcepub fn from_display(err: impl Display) -> Self
pub fn from_display(err: impl Display) -> Self
Creates an error from any displayable value.
Trait Implementations§
Source§impl Clone for HostAbiError
impl Clone for HostAbiError
Source§fn clone(&self) -> HostAbiError
fn clone(&self) -> HostAbiError
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for HostAbiError
impl Debug for HostAbiError
Source§impl<'de> Deserialize<'de> for HostAbiError
impl<'de> Deserialize<'de> for HostAbiError
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<&str> for HostAbiError
impl From<&str> for HostAbiError
Source§impl From<String> for HostAbiError
impl From<String> for HostAbiError
Source§impl PartialEq for HostAbiError
impl PartialEq for HostAbiError
Source§impl Serialize for HostAbiError
impl Serialize for HostAbiError
impl Eq for HostAbiError
impl StructuralPartialEq for HostAbiError
Auto Trait Implementations§
impl Freeze for HostAbiError
impl RefUnwindSafe for HostAbiError
impl Send for HostAbiError
impl Sync for HostAbiError
impl Unpin for HostAbiError
impl UnsafeUnpin for HostAbiError
impl UnwindSafe for HostAbiError
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more