pub struct SpanBatchPrefix {
pub rel_timestamp: u64,
pub l1_origin_num: u64,
pub parent_check: FixedBytes<20>,
pub l1_origin_check: FixedBytes<20>,
}
Expand description
Span Batch Prefix
Fields§
§rel_timestamp: u64
Relative timestamp of the first block
l1_origin_num: u64
L1 origin number
parent_check: FixedBytes<20>
First 20 bytes of the first block’s parent hash
l1_origin_check: FixedBytes<20>
First 20 bytes of the last block’s L1 origin hash
Implementations§
Source§impl SpanBatchPrefix
impl SpanBatchPrefix
Sourcepub fn decode_prefix(r: &mut &[u8]) -> Result<Self, SpanBatchError>
pub fn decode_prefix(r: &mut &[u8]) -> Result<Self, SpanBatchError>
Decodes a SpanBatchPrefix from a reader.
Sourcepub fn decode_rel_timestamp(
&mut self,
r: &mut &[u8],
) -> Result<(), SpanBatchError>
pub fn decode_rel_timestamp( &mut self, r: &mut &[u8], ) -> Result<(), SpanBatchError>
Decodes the relative timestamp from a reader.
Sourcepub fn decode_l1_origin_num(
&mut self,
r: &mut &[u8],
) -> Result<(), SpanBatchError>
pub fn decode_l1_origin_num( &mut self, r: &mut &[u8], ) -> Result<(), SpanBatchError>
Decodes the L1 origin number from a reader.
Sourcepub fn decode_parent_check(
&mut self,
r: &mut &[u8],
) -> Result<(), SpanBatchError>
pub fn decode_parent_check( &mut self, r: &mut &[u8], ) -> Result<(), SpanBatchError>
Decodes the parent check from a reader.
Sourcepub fn decode_l1_origin_check(
&mut self,
r: &mut &[u8],
) -> Result<(), SpanBatchError>
pub fn decode_l1_origin_check( &mut self, r: &mut &[u8], ) -> Result<(), SpanBatchError>
Decodes the L1 origin check from a reader.
Sourcepub fn encode_prefix(&self, w: &mut Vec<u8>)
pub fn encode_prefix(&self, w: &mut Vec<u8>)
Encodes the SpanBatchPrefix into a writer.
Trait Implementations§
Source§impl Clone for SpanBatchPrefix
impl Clone for SpanBatchPrefix
Source§fn clone(&self) -> SpanBatchPrefix
fn clone(&self) -> SpanBatchPrefix
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 SpanBatchPrefix
impl Debug for SpanBatchPrefix
Source§impl Default for SpanBatchPrefix
impl Default for SpanBatchPrefix
Source§fn default() -> SpanBatchPrefix
fn default() -> SpanBatchPrefix
Returns the “default value” for a type. Read more
Source§impl PartialEq for SpanBatchPrefix
impl PartialEq for SpanBatchPrefix
impl Eq for SpanBatchPrefix
impl StructuralPartialEq for SpanBatchPrefix
Auto Trait Implementations§
impl Freeze for SpanBatchPrefix
impl RefUnwindSafe for SpanBatchPrefix
impl Send for SpanBatchPrefix
impl Sync for SpanBatchPrefix
impl Unpin for SpanBatchPrefix
impl UnwindSafe for SpanBatchPrefix
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
)