Enum novax_data::AddressError
source · pub enum AddressError {
InvalidBech32String,
CannotConvertToBech32String,
}Expand description
Enumerates the errors that can occur within operations related to the Address struct.
This enum encapsulates specific error cases encountered when working with the Address
struct, such as converting to and from Bech32 string representation.
When an AddressError occurs, it can be converted into a DataError which serves as
a centralized error type for broader error handling.
Variants
InvalidBech32String: This error occurs when attempting to construct anAddressfrom an invalid Bech32 string.CannotConvertToBech32String: This error occurs when attempting to convert anAddressto its Bech32 string representation.
Example
let error = AddressError::InvalidBech32String;
let data_error: DataError = error.into();Variants§
InvalidBech32String
Represents an error case where an invalid Bech32 string is provided.
CannotConvertToBech32String
Represents an error case where an Address cannot be converted to its Bech32 string representation.
Trait Implementations§
source§impl Clone for AddressError
impl Clone for AddressError
source§fn clone(&self) -> AddressError
fn clone(&self) -> AddressError
Returns a copy 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 AddressError
impl Debug for AddressError
source§impl<'de> Deserialize<'de> for AddressError
impl<'de> Deserialize<'de> for AddressError
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<AddressError> for DataError
impl From<AddressError> for DataError
Provides a conversion from AddressError to DataError.
This implementation allows for an AddressError to be converted into a DataError,
facilitating centralized error handling.
source§fn from(value: AddressError) -> Self
fn from(value: AddressError) -> Self
Converts to this type from the input type.
source§impl PartialEq for AddressError
impl PartialEq for AddressError
source§fn eq(&self, other: &AddressError) -> bool
fn eq(&self, other: &AddressError) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl Serialize for AddressError
impl Serialize for AddressError
impl StructuralPartialEq for AddressError
Auto Trait Implementations§
impl CodecFromSelf for AddressError
impl RefUnwindSafe for AddressError
impl Send for AddressError
impl Sync for AddressError
impl Unpin for AddressError
impl UnwindSafe for AddressError
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