Struct tendermint_light_client::store::memory::MemoryStore
source · pub struct MemoryStore { /* private fields */ }
Expand description
Transient in-memory store.
Implementations§
source§impl MemoryStore
impl MemoryStore
Trait Implementations§
source§impl Clone for MemoryStore
impl Clone for MemoryStore
source§fn clone(&self) -> MemoryStore
fn clone(&self) -> MemoryStore
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 MemoryStore
impl Debug for MemoryStore
source§impl Default for MemoryStore
impl Default for MemoryStore
source§fn default() -> MemoryStore
fn default() -> MemoryStore
Returns the “default value” for a type. Read more
source§impl LightStore for MemoryStore
impl LightStore for MemoryStore
source§fn get(&self, height: Height, status: Status) -> Option<LightBlock>
fn get(&self, height: Height, status: Status) -> Option<LightBlock>
Get the light block at the given height with the given status, or return
None
otherwise.source§fn insert(&mut self, light_block: LightBlock, status: Status)
fn insert(&mut self, light_block: LightBlock, status: Status)
Insert a new light block in the store with the given status.
Overrides any other block with the same height and status.
source§fn remove(&mut self, height: Height, status: Status)
fn remove(&mut self, height: Height, status: Status)
Remove the light block with the given height and status, if any.
source§fn update(&mut self, light_block: &LightBlock, status: Status)
fn update(&mut self, light_block: &LightBlock, status: Status)
Update the
status
of the given light_block
.source§fn highest(&self, status: Status) -> Option<LightBlock>
fn highest(&self, status: Status) -> Option<LightBlock>
Get the light block of greatest height with the given status.
source§fn highest_before(&self, height: Height, status: Status) -> Option<LightBlock>
fn highest_before(&self, height: Height, status: Status) -> Option<LightBlock>
Get the light block of greatest height before the given height with the given status.
source§fn lowest(&self, status: Status) -> Option<LightBlock>
fn lowest(&self, status: Status) -> Option<LightBlock>
Get the light block of lowest height with the given status.
source§fn all(&self, status: Status) -> Box<dyn Iterator<Item = LightBlock>>
fn all(&self, status: Status) -> Box<dyn Iterator<Item = LightBlock>>
Get an iterator of all light blocks with the given status.
source§fn get_non_failed(&self, height: Height) -> Option<(LightBlock, Status)>
fn get_non_failed(&self, height: Height) -> Option<(LightBlock, Status)>
Get a block at a given height whatever its verification status as long as it hasn’t failed
verification (ie. its status is not
Status::Failed
).source§fn highest_trusted_or_verified(&self) -> Option<LightBlock>
fn highest_trusted_or_verified(&self) -> Option<LightBlock>
Get the light block of greatest height with the trusted or verified status.
source§fn highest_trusted_or_verified_before(
&self,
height: Height
) -> Option<LightBlock>
fn highest_trusted_or_verified_before( &self, height: Height ) -> Option<LightBlock>
Get the first light block before the given height with the trusted or verified status.
source§fn lowest_trusted_or_verified(&self) -> Option<LightBlock>
fn lowest_trusted_or_verified(&self) -> Option<LightBlock>
Get the light block of lowest height with the trusted or verified status.
source§fn get_trusted_or_verified(&self, height: Height) -> Option<LightBlock>
fn get_trusted_or_verified(&self, height: Height) -> Option<LightBlock>
Get the light block of the given height with the trusted or verified status.
Auto Trait Implementations§
impl Freeze for MemoryStore
impl RefUnwindSafe for MemoryStore
impl Send for MemoryStore
impl Sync for MemoryStore
impl Unpin for MemoryStore
impl UnwindSafe for MemoryStore
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