Struct scrypto::address::AddressBech32Decoder
source · pub struct AddressBech32Decoder {
pub hrp_set: HrpSet,
}
Expand description
Represents a decoder which understands how to decode Scrypto addresses in Bech32.
Fields§
§hrp_set: HrpSet
Implementations§
source§impl AddressBech32Decoder
impl AddressBech32Decoder
pub fn for_simulator() -> AddressBech32Decoder
sourcepub fn new(network: &NetworkDefinition) -> AddressBech32Decoder
pub fn new(network: &NetworkDefinition) -> AddressBech32Decoder
Instantiates a new AddressBech32Decoder with the HRP corresponding to the passed network.
pub fn validate_and_decode_ignore_hrp( address: &str ) -> Result<(String, EntityType, Vec<u8>), AddressBech32DecodeError>
sourcepub fn validate_and_decode(
&self,
address: &str
) -> Result<(EntityType, Vec<u8>), AddressBech32DecodeError>
pub fn validate_and_decode( &self, address: &str ) -> Result<(EntityType, Vec<u8>), AddressBech32DecodeError>
Low level method which performs the Bech32 validation and decoding of the data.
Auto Trait Implementations§
impl RefUnwindSafe for AddressBech32Decoder
impl Send for AddressBech32Decoder
impl Sync for AddressBech32Decoder
impl Unpin for AddressBech32Decoder
impl UnwindSafe for AddressBech32Decoder
Blanket Implementations§
§impl<U> As for U
impl<U> As for U
§fn as_<T>(self) -> Twhere
T: CastFrom<U>,
fn as_<T>(self) -> Twhere
T: CastFrom<U>,
Casts
self
to type T
. The semantics of numeric casting with the as
operator are followed, so <T as As>::as_::<U>
can be used in the same way as T as U
for numeric conversions. Read moresource§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