Enum sc_light::backend::GenesisOrUnavailableState [−][src]
pub enum GenesisOrUnavailableState<H: Hasher> { Genesis(InMemoryBackend<H>), Unavailable, }
Either in-memory genesis state, or locally-unavailable state.
Variants
Genesis(InMemoryBackend<H>)
Genesis state - storage values are stored in-memory.
We know that state exists, but all calls will fail with error, because it isn’t locally available.
Trait Implementations
impl<H: Hasher> Backend<H> for GenesisOrUnavailableState<H> where
H::Out: Ord + Codec,
[src]
impl<H: Hasher> Backend<H> for GenesisOrUnavailableState<H> where
H::Out: Ord + Codec,
[src]type Error = ClientError
An error type when fetching data is not possible.
type Transaction = <InMemoryBackend<H> as StateBackend<H>>::Transaction
Storage changes to be applied if committing
type TrieBackendStorage = <InMemoryBackend<H> as StateBackend<H>>::TrieBackendStorage
Type of trie backend storage.
fn storage(&self, key: &[u8]) -> ClientResult<Option<Vec<u8>>>
[src]
fn child_storage(
&self,
child_info: &ChildInfo,
key: &[u8]
) -> ClientResult<Option<Vec<u8>>>
[src]
&self,
child_info: &ChildInfo,
key: &[u8]
) -> ClientResult<Option<Vec<u8>>>
fn next_storage_key(&self, key: &[u8]) -> Result<Option<Vec<u8>>, Self::Error>
[src]
fn next_child_storage_key(
&self,
child_info: &ChildInfo,
key: &[u8]
) -> Result<Option<Vec<u8>>, Self::Error>
[src]
&self,
child_info: &ChildInfo,
key: &[u8]
) -> Result<Option<Vec<u8>>, Self::Error>
fn for_keys_with_prefix<A: FnMut(&[u8])>(&self, prefix: &[u8], action: A)
[src]
fn for_key_values_with_prefix<A: FnMut(&[u8], &[u8])>(
&self,
prefix: &[u8],
action: A
)
[src]
&self,
prefix: &[u8],
action: A
)
fn apply_to_child_keys_while<A: FnMut(&[u8]) -> bool>(
&self,
child_info: &ChildInfo,
action: A
)
[src]
&self,
child_info: &ChildInfo,
action: A
)
fn for_child_keys_with_prefix<A: FnMut(&[u8])>(
&self,
child_info: &ChildInfo,
prefix: &[u8],
action: A
)
[src]
&self,
child_info: &ChildInfo,
prefix: &[u8],
action: A
)
fn storage_root<'a>(
&self,
delta: impl Iterator<Item = (&'a [u8], Option<&'a [u8]>)>
) -> (H::Out, Self::Transaction) where
H::Out: Ord,
[src]
&self,
delta: impl Iterator<Item = (&'a [u8], Option<&'a [u8]>)>
) -> (H::Out, Self::Transaction) where
H::Out: Ord,
fn child_storage_root<'a>(
&self,
child_info: &ChildInfo,
delta: impl Iterator<Item = (&'a [u8], Option<&'a [u8]>)>
) -> (H::Out, bool, Self::Transaction) where
H::Out: Ord,
[src]
&self,
child_info: &ChildInfo,
delta: impl Iterator<Item = (&'a [u8], Option<&'a [u8]>)>
) -> (H::Out, bool, Self::Transaction) where
H::Out: Ord,
fn pairs(&self) -> Vec<(Vec<u8>, Vec<u8>)>
[src]
fn keys(&self, prefix: &[u8]) -> Vec<Vec<u8>>
[src]
fn register_overlay_stats(&mut self, _stats: &StateMachineStats)
[src]
fn usage_info(&self) -> UsageInfo
[src]
fn as_trie_backend(
&mut self
) -> Option<&TrieBackend<Self::TrieBackendStorage, H>>
[src]
&mut self
) -> Option<&TrieBackend<Self::TrieBackendStorage, H>>
pub fn storage_hash(
&self,
key: &[u8]
) -> Result<Option<<H as Hasher>::Out>, Self::Error>
[src]
&self,
key: &[u8]
) -> Result<Option<<H as Hasher>::Out>, Self::Error>
pub fn child_storage_hash(
&self,
child_info: &ChildInfo,
key: &[u8]
) -> Result<Option<<H as Hasher>::Out>, Self::Error>
[src]
&self,
child_info: &ChildInfo,
key: &[u8]
) -> Result<Option<<H as Hasher>::Out>, Self::Error>
pub fn exists_storage(&self, key: &[u8]) -> Result<bool, Self::Error>
[src]
pub fn exists_child_storage(
&self,
child_info: &ChildInfo,
key: &[u8]
) -> Result<bool, Self::Error>
[src]
&self,
child_info: &ChildInfo,
key: &[u8]
) -> Result<bool, Self::Error>
pub fn child_keys(
&self,
child_info: &ChildInfo,
prefix: &[u8]
) -> Vec<Vec<u8, Global>, Global>
[src]
&self,
child_info: &ChildInfo,
prefix: &[u8]
) -> Vec<Vec<u8, Global>, Global>
pub fn full_storage_root<'a>(
&self,
delta: impl Iterator<Item = (&'a [u8], Option<&'a [u8]>)>,
child_deltas: impl Iterator<Item = (&'a ChildInfo, impl Iterator<Item = (&'a [u8], Option<&'a [u8]>)>)>
) -> (<H as Hasher>::Out, Self::Transaction) where
<H as Hasher>::Out: Ord,
<H as Hasher>::Out: Encode,
[src]
&self,
delta: impl Iterator<Item = (&'a [u8], Option<&'a [u8]>)>,
child_deltas: impl Iterator<Item = (&'a ChildInfo, impl Iterator<Item = (&'a [u8], Option<&'a [u8]>)>)>
) -> (<H as Hasher>::Out, Self::Transaction) where
<H as Hasher>::Out: Ord,
<H as Hasher>::Out: Encode,
pub fn wipe(&self) -> Result<(), Self::Error>
[src]
pub fn commit(
&self,
<H as Hasher>::Out,
Self::Transaction,
Vec<(Vec<u8, Global>, Option<Vec<u8, Global>>), Global>,
Vec<(Vec<u8, Global>, Vec<(Vec<u8, Global>, Option<Vec<u8, Global>>), Global>), Global>
) -> Result<(), Self::Error>
[src]
&self,
<H as Hasher>::Out,
Self::Transaction,
Vec<(Vec<u8, Global>, Option<Vec<u8, Global>>), Global>,
Vec<(Vec<u8, Global>, Vec<(Vec<u8, Global>, Option<Vec<u8, Global>>), Global>), Global>
) -> Result<(), Self::Error>
pub fn read_write_count(&self) -> (u32, u32, u32, u32)
[src]
pub fn reset_read_write_count(&self)
[src]
pub fn get_whitelist(&self) -> Vec<TrackedStorageKey, Global>
[src]
pub fn set_whitelist(&self, Vec<TrackedStorageKey, Global>)
[src]
Auto Trait Implementations
impl<H> RefUnwindSafe for GenesisOrUnavailableState<H> where
H: RefUnwindSafe,
<H as Hasher>::Out: RefUnwindSafe,
H: RefUnwindSafe,
<H as Hasher>::Out: RefUnwindSafe,
impl<H> Send for GenesisOrUnavailableState<H>
impl<H> Sync for GenesisOrUnavailableState<H>
impl<H> Unpin for GenesisOrUnavailableState<H> where
H: Unpin,
<H as Hasher>::Out: Unpin,
H: Unpin,
<H as Hasher>::Out: Unpin,
impl<H> UnwindSafe for GenesisOrUnavailableState<H> where
H: UnwindSafe,
<H as Hasher>::Out: UnwindSafe,
H: UnwindSafe,
<H as Hasher>::Out: UnwindSafe,
Blanket Implementations
impl<T> CheckedConversion for T
[src]
impl<T> CheckedConversion for T
[src]pub fn checked_from<T>(t: T) -> Option<Self> where
Self: TryFrom<T>,
[src]
Self: TryFrom<T>,
pub fn checked_into<T>(self) -> Option<T> where
Self: TryInto<T>,
[src]
Self: TryInto<T>,
impl<H, B> InspectState<H, B> for B where
B: Backend<H>,
H: Hasher,
[src]
impl<H, B> InspectState<H, B> for B where
B: Backend<H>,
H: Hasher,
[src]pub fn inspect_state<F, R>(&self, f: F) -> R where
F: FnOnce() -> R,
[src]
F: FnOnce() -> R,
impl<T> Instrument for T
[src]
impl<T> Instrument for T
[src]pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T> Instrument for T
[src]
impl<T> Instrument for T
[src]pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, Outer> IsWrappedBy<Outer> for T where
T: From<Outer>,
Outer: AsRef<T> + AsMut<T> + From<T>,
[src]
impl<T, Outer> IsWrappedBy<Outer> for T where
T: From<Outer>,
Outer: AsRef<T> + AsMut<T> + From<T>,
[src]impl<T> SaturatedConversion for T
[src]
impl<T> SaturatedConversion for T
[src]pub fn saturated_from<T>(t: T) -> Self where
Self: UniqueSaturatedFrom<T>,
[src]
Self: UniqueSaturatedFrom<T>,
pub fn saturated_into<T>(self) -> T where
Self: UniqueSaturatedInto<T>,
[src]
Self: UniqueSaturatedInto<T>,
impl<S, T> UncheckedInto<T> for S where
T: UncheckedFrom<S>,
[src]
impl<S, T> UncheckedInto<T> for S where
T: UncheckedFrom<S>,
[src]pub fn unchecked_into(self) -> T
[src]
impl<T, S> UniqueSaturatedInto<T> for S where
S: TryInto<T>,
T: Bounded,
[src]
impl<T, S> UniqueSaturatedInto<T> for S where
S: TryInto<T>,
T: Bounded,
[src]pub fn unique_saturated_into(self) -> T
[src]
impl<T> WithSubscriber for T
[src]
impl<T> WithSubscriber for T
[src]pub fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
[src]
S: Into<Dispatch>,
pub fn with_current_subscriber(self) -> WithDispatch<Self>
[src]
impl<T> MaybeDebug for T where
T: Debug,
[src]
T: Debug,
impl<T> MaybeDebug for T where
T: Debug,
[src]
T: Debug,
impl<T> MaybeRefUnwindSafe for T where
T: RefUnwindSafe,
[src]
T: RefUnwindSafe,