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 size_hint(&self) -> usize
fn size_hint(&self) -> usize
If possible give a hint of expected size of the encoding. Read more
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.
source§fn using_encoded<R, F>(&self, f: F) -> R
fn using_encoded<R, F>(&self, f: F) -> R
Convert self to a slice and then invoke the given closure with it.
source§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 for StorageEntryModifierIR
impl PartialEq 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 ==
.impl EncodeLike for StorageEntryModifierIR
impl Eq for StorageEntryModifierIR
impl StructuralEq for StorageEntryModifierIR
impl StructuralPartialEq for StorageEntryModifierIR
Auto Trait Implementations§
impl RefUnwindSafe for StorageEntryModifierIR
impl Send for StorageEntryModifierIR
impl Sync for StorageEntryModifierIR
impl Unpin for StorageEntryModifierIR
impl UnwindSafe for StorageEntryModifierIR
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more