Type Alias sp_genesis_builder::PresetId

source ·
pub type PresetId = RuntimeString;
Expand description

The type representing preset ID.

Aliased Type§

enum PresetId {
    Borrowed(&'static str),
    Owned(String),
}

Variants§

§

Borrowed(&'static str)

The borrowed mode that wraps a &'static str.

§

Owned(String)

The owned mode that wraps a String.

Trait Implementations

source§

impl AsRef<[u8]> for RuntimeString

source§

fn as_ref(&self) -> &[u8]

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl Clone for RuntimeString

source§

fn clone(&self) -> RuntimeString

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for RuntimeString

source§

fn fmt(&self, fmt: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl Decode for RuntimeString

source§

fn decode<I>(value: &mut I) -> Result<RuntimeString, Error>
where I: Input,

Attempt to deserialise the value from input.
source§

fn decode_into<I>( input: &mut I, dst: &mut MaybeUninit<Self>, ) -> Result<DecodeFinished, Error>
where I: Input,

Attempt to deserialize the value from input into a pre-allocated piece of memory. Read more
source§

fn skip<I>(input: &mut I) -> Result<(), Error>
where I: Input,

Attempt to skip the encoded value from input. Read more
source§

fn encoded_fixed_size() -> Option<usize>

Returns the fixed encoded size of the type. Read more
source§

impl Default for RuntimeString

source§

fn default() -> RuntimeString

Returns the “default value” for a type. Read more
source§

impl Deref for RuntimeString

§

type Target = str

The resulting type after dereferencing.
source§

fn deref(&self) -> &str

Dereferences the value.
source§

impl<'de> Deserialize<'de> for RuntimeString

source§

fn deserialize<D>( de: D, ) -> Result<RuntimeString, <D as Deserializer<'de>>::Error>
where D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Display for RuntimeString

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl Encode for RuntimeString

source§

fn encode(&self) -> Vec<u8>

Convert self to an owned vector.
source§

fn size_hint(&self) -> usize

If possible give a hint of expected size of the encoding. Read more
source§

fn encode_to<T>(&self, dest: &mut T)
where T: Output + ?Sized,

Convert self to a slice and append it to the destination.
source§

fn using_encoded<R, F>(&self, f: F) -> R
where F: FnOnce(&[u8]) -> R,

Convert self to a slice and then invoke the given closure with it.
source§

fn encoded_size(&self) -> usize

Calculates the encoded size. Read more
source§

impl From<&'static str> for RuntimeString

source§

fn from(data: &'static str) -> RuntimeString

Converts to this type from the input type.
source§

impl PartialEq for RuntimeString

source§

fn eq(&self, other: &RuntimeString) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Serialize for RuntimeString

source§

fn serialize<S>( &self, serializer: S, ) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>
where S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl TypeInfo for RuntimeString

§

type Identity = str

The type identifying for which type info is provided. Read more
source§

fn type_info() -> Type

Returns the static type identifier for Self.
source§

impl Eq for RuntimeString