pub struct BatchStoreState {
pub first: BatchNumber,
pub last: Option<BatchNumber>,
}
Expand description
State of the BatchStore
: continuous range of batches.
Fields§
§first: BatchNumber
Stored batch with the lowest number.
If last is None
, this is the first batch that should be fetched.
last: Option<BatchNumber>
The last stored L1 batch. None iff store is empty.
Implementations§
source§impl BatchStoreState
impl BatchStoreState
sourcepub fn contains(&self, number: BatchNumber) -> bool
pub fn contains(&self, number: BatchNumber) -> bool
Checks whether batch with the given number is stored in the BatchStore
.
sourcepub fn next(&self) -> BatchNumber
pub fn next(&self) -> BatchNumber
Number of the next batch that can be stored in the BatchStore
.
(i.e. last
+ 1).
Trait Implementations§
source§impl Clone for BatchStoreState
impl Clone for BatchStoreState
source§fn clone(&self) -> BatchStoreState
fn clone(&self) -> BatchStoreState
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 BatchStoreState
impl Debug for BatchStoreState
source§impl PartialEq for BatchStoreState
impl PartialEq for BatchStoreState
impl Eq for BatchStoreState
impl StructuralPartialEq for BatchStoreState
Auto Trait Implementations§
impl Freeze for BatchStoreState
impl RefUnwindSafe for BatchStoreState
impl Send for BatchStoreState
impl Sync for BatchStoreState
impl Unpin for BatchStoreState
impl UnwindSafe for BatchStoreState
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.