pub enum StorageEntryModifierIR {
Optional,
Default,
}
Expand description
A storage entry modifier indicates how a storage entry is returned when fetched and what the value will be if the key is not present. Specifically this refers to the “return type” when fetching a storage entry, and what the value will be if the key is not present.
Optional
means you should expect an Option<T>
, with None
returned if the key is not
present. Default
means you should expect a T
with the default value of default if the key is
not present.
Variants§
Optional
The storage entry returns an Option<T>
, with None
if the key is not present.
Default
The storage entry returns T::Default
if the key is not present.
Trait Implementations§
source§impl Clone for StorageEntryModifierIR
impl Clone for StorageEntryModifierIR
source§fn clone(&self) -> StorageEntryModifierIR
fn clone(&self) -> StorageEntryModifierIR
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 StorageEntryModifierIR
impl Debug for StorageEntryModifierIR
source§impl Encode for StorageEntryModifierIR
impl Encode for StorageEntryModifierIR
source§fn encode_to<__CodecOutputEdqy: Output + ?Sized>(
&self,
__codec_dest_edqy: &mut __CodecOutputEdqy
)
fn encode_to<__CodecOutputEdqy: Output + ?Sized>( &self, __codec_dest_edqy: &mut __CodecOutputEdqy )
Convert self to a slice and append it to the destination.
§fn using_encoded<R, F>(&self, f: F) -> Rwhere
F: FnOnce(&[u8]) -> R,
fn using_encoded<R, F>(&self, f: F) -> Rwhere F: FnOnce(&[u8]) -> R,
Convert self to a slice and then invoke the given closure with it.
§fn encoded_size(&self) -> usize
fn encoded_size(&self) -> usize
Calculates the encoded size. Read more
source§impl From<StorageEntryModifierIR> for StorageEntryModifier
impl From<StorageEntryModifierIR> for StorageEntryModifier
source§fn from(ir: StorageEntryModifierIR) -> Self
fn from(ir: StorageEntryModifierIR) -> Self
Converts to this type from the input type.
source§impl PartialEq<StorageEntryModifierIR> for StorageEntryModifierIR
impl PartialEq<StorageEntryModifierIR> for StorageEntryModifierIR
source§fn eq(&self, other: &StorageEntryModifierIR) -> bool
fn eq(&self, other: &StorageEntryModifierIR) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.