Struct offchain::subaddress::Subaddress
source · pub struct Subaddress(_);
Implementations§
source§impl Subaddress
impl Subaddress
pub const fn new(address: [u8; 8]) -> Self
pub fn generate<R>(rng: &mut R) -> Selfwhere R: RngCore + CryptoRng,
pub fn to_vec(&self) -> Vec<u8> ⓘ
pub fn from_hex<T: AsRef<[u8]>>(hex: T) -> Result<Self, SubaddressParseError>
pub fn to_hex(&self) -> String
pub fn from_bytes<T: AsRef<[u8]>>( bytes: T ) -> Result<Self, SubaddressParseError>
Trait Implementations§
source§impl Clone for Subaddress
impl Clone for Subaddress
source§fn clone(&self) -> Subaddress
fn clone(&self) -> Subaddress
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 Subaddress
impl Debug for Subaddress
source§impl Display for Subaddress
impl Display for Subaddress
source§impl Hash for Subaddress
impl Hash for Subaddress
source§impl LowerHex for Subaddress
impl LowerHex for Subaddress
source§impl Ord for Subaddress
impl Ord for Subaddress
source§fn cmp(&self, other: &Subaddress) -> Ordering
fn cmp(&self, other: &Subaddress) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq<Subaddress> for Subaddress
impl PartialEq<Subaddress> for Subaddress
source§fn eq(&self, other: &Subaddress) -> bool
fn eq(&self, other: &Subaddress) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<Subaddress> for Subaddress
impl PartialOrd<Subaddress> for Subaddress
source§fn partial_cmp(&self, other: &Subaddress) -> Option<Ordering>
fn partial_cmp(&self, other: &Subaddress) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl UpperHex for Subaddress
impl UpperHex for Subaddress
impl Copy for Subaddress
impl Eq for Subaddress
impl StructuralEq for Subaddress
impl StructuralPartialEq for Subaddress
Auto Trait Implementations§
impl RefUnwindSafe for Subaddress
impl Send for Subaddress
impl Sync for Subaddress
impl Unpin for Subaddress
impl UnwindSafe for Subaddress
Blanket Implementations§
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.