Struct sp_core::crypto::Ss58AddressFormat
source · [−]pub struct Ss58AddressFormat { /* private fields */ }
Expand description
A custom address format. See also Ss58AddressFormatRegistry
Implementations
sourceimpl Ss58AddressFormat
impl Ss58AddressFormat
An enumeration of unique networks. Some are reserved.
sourcepub fn custom(prefix: u16) -> Ss58AddressFormat
pub fn custom(prefix: u16) -> Ss58AddressFormat
Custom constructor
sourcepub fn all_names() -> &'static [&'static str]
pub fn all_names() -> &'static [&'static str]
names of all address formats
sourcepub fn all() -> &'static [Ss58AddressFormatRegistry]
pub fn all() -> &'static [Ss58AddressFormatRegistry]
All known address formats.
Trait Implementations
sourceimpl Clone for Ss58AddressFormat
impl Clone for Ss58AddressFormat
sourcepub fn clone(&self) -> Ss58AddressFormat
pub fn clone(&self) -> Ss58AddressFormat
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for Ss58AddressFormat
impl Debug for Ss58AddressFormat
sourceimpl Display for Ss58AddressFormat
impl Display for Ss58AddressFormat
Display the name of the address format (not the description).
sourceimpl From<Ss58AddressFormat> for String
impl From<Ss58AddressFormat> for String
sourcepub fn from(x: Ss58AddressFormat) -> String
pub fn from(x: Ss58AddressFormat) -> String
Performs the conversion.
sourceimpl From<Ss58AddressFormatRegistry> for Ss58AddressFormat
impl From<Ss58AddressFormatRegistry> for Ss58AddressFormat
sourcepub fn from(x: Ss58AddressFormatRegistry) -> Ss58AddressFormat
pub fn from(x: Ss58AddressFormatRegistry) -> Ss58AddressFormat
Performs the conversion.
sourceimpl From<u16> for Ss58AddressFormat
impl From<u16> for Ss58AddressFormat
sourcepub fn from(prefix: u16) -> Ss58AddressFormat
pub fn from(prefix: u16) -> Ss58AddressFormat
Performs the conversion.
sourceimpl From<u8> for Ss58AddressFormat
impl From<u8> for Ss58AddressFormat
sourcepub fn from(x: u8) -> Ss58AddressFormat
pub fn from(x: u8) -> Ss58AddressFormat
Performs the conversion.
sourceimpl PartialEq<Ss58AddressFormat> for Ss58AddressFormat
impl PartialEq<Ss58AddressFormat> for Ss58AddressFormat
sourcepub fn eq(&self, other: &Ss58AddressFormat) -> bool
pub fn eq(&self, other: &Ss58AddressFormat) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcepub fn ne(&self, other: &Ss58AddressFormat) -> bool
pub fn ne(&self, other: &Ss58AddressFormat) -> bool
This method tests for !=
.
sourceimpl<'a> TryFrom<&'a str> for Ss58AddressFormat
impl<'a> TryFrom<&'a str> for Ss58AddressFormat
type Error = ParseError
type Error = ParseError
The type returned in the event of a conversion error.
sourcepub fn try_from(
x: &'a str
) -> Result<Ss58AddressFormat, <Ss58AddressFormat as TryFrom<&'a str>>::Error>
pub fn try_from(
x: &'a str
) -> Result<Ss58AddressFormat, <Ss58AddressFormat as TryFrom<&'a str>>::Error>
Performs the conversion.
sourceimpl TryFrom<Ss58AddressFormat> for Ss58AddressFormatRegistry
impl TryFrom<Ss58AddressFormat> for Ss58AddressFormatRegistry
type Error = ParseError
type Error = ParseError
The type returned in the event of a conversion error.
sourcepub fn try_from(
x: Ss58AddressFormat
) -> Result<Ss58AddressFormatRegistry, ParseError>
pub fn try_from(
x: Ss58AddressFormat
) -> Result<Ss58AddressFormatRegistry, ParseError>
Performs the conversion.
impl Copy for Ss58AddressFormat
impl Eq for Ss58AddressFormat
impl StructuralEq for Ss58AddressFormat
impl StructuralPartialEq for Ss58AddressFormat
Auto Trait Implementations
impl RefUnwindSafe for Ss58AddressFormat
impl Send for Ss58AddressFormat
impl Sync for Ss58AddressFormat
impl Unpin for Ss58AddressFormat
impl UnwindSafe for Ss58AddressFormat
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> Downcast for T where
T: Any,
impl<T> Downcast for T where
T: Any,
pub fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
pub fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
Convert Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
. Read more
pub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
pub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
Convert Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
. Read more
pub fn as_any(&self) -> &(dyn Any + 'static)
pub fn as_any(&self) -> &(dyn Any + 'static)
Convert &Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s. Read more
pub fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
pub fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert &mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T, Outer> IsWrappedBy<Outer> for T where
Outer: AsRef<T> + AsMut<T> + From<T>,
T: From<Outer>,
impl<T, Outer> IsWrappedBy<Outer> for T where
Outer: AsRef<T> + AsMut<T> + From<T>,
T: From<Outer>,
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more
sourceimpl<S, T> UncheckedInto<T> for S where
T: UncheckedFrom<S>,
impl<S, T> UncheckedInto<T> for S where
T: UncheckedFrom<S>,
sourcefn unchecked_into(self) -> T
fn unchecked_into(self) -> T
The counterpart to unchecked_from
.
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
pub fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more