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() -> &'static [Ss58AddressFormatRegistry]
pub fn all() -> &'static [Ss58AddressFormatRegistry]
All known address formats.
Trait Implementations
sourceimpl Clone for Ss58AddressFormat
impl Clone for Ss58AddressFormat
sourcefn clone(&self) -> Ss58AddressFormat
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 moresourceimpl 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
sourcefn from(x: Ss58AddressFormat) -> String
fn from(x: Ss58AddressFormat) -> String
Converts to this type from the input type.
sourceimpl From<Ss58AddressFormatRegistry> for Ss58AddressFormat
impl From<Ss58AddressFormatRegistry> for Ss58AddressFormat
sourcefn from(x: Ss58AddressFormatRegistry) -> Ss58AddressFormat
fn from(x: Ss58AddressFormatRegistry) -> Ss58AddressFormat
Converts to this type from the input type.
sourceimpl From<u16> for Ss58AddressFormat
impl From<u16> for Ss58AddressFormat
sourcefn from(prefix: u16) -> Ss58AddressFormat
fn from(prefix: u16) -> Ss58AddressFormat
Converts to this type from the input type.
sourceimpl From<u8> for Ss58AddressFormat
impl From<u8> for Ss58AddressFormat
sourcefn from(x: u8) -> Ss58AddressFormat
fn from(x: u8) -> Ss58AddressFormat
Converts to this type from the input type.
sourceimpl PartialEq<Ss58AddressFormat> for Ss58AddressFormat
impl PartialEq<Ss58AddressFormat> for Ss58AddressFormat
sourcefn eq(&self, other: &Ss58AddressFormat) -> bool
fn eq(&self, other: &Ss58AddressFormat) -> bool
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.
sourcefn try_from(
x: &'a str
) -> Result<Ss58AddressFormat, <Ss58AddressFormat as TryFrom<&'a str>>::Error>
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.
sourcefn try_from(
x: Ss58AddressFormat
) -> Result<Ss58AddressFormatRegistry, ParseError>
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 Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
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 morefn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
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 morefn as_any(&self) -> &(dyn Any + 'static)
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 morefn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
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 moresourceimpl<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 Twhere
Outer: AsRef<T> + AsMut<T> + From<T>,
T: From<Outer>,
impl<T, Outer> IsWrappedBy<Outer> for Twhere
Outer: AsRef<T> + AsMut<T> + From<T>,
T: From<Outer>,
sourceimpl<S, T> UncheckedInto<T> for Swhere
T: UncheckedFrom<S>,
impl<S, T> UncheckedInto<T> for Swhere
T: UncheckedFrom<S>,
sourcefn unchecked_into(self) -> T
fn unchecked_into(self) -> T
The counterpart to
unchecked_from
.