pub struct RawSpanBatch {
pub prefix: SpanBatchPrefix,
pub payload: SpanBatchPayload,
}
Expand description
Raw Span Batch
Fields§
§prefix: SpanBatchPrefix
The span batch prefix
payload: SpanBatchPayload
The span batch payload
Implementations§
Source§impl RawSpanBatch
impl RawSpanBatch
Sourcepub const fn get_batch_type(&self) -> BatchType
pub const fn get_batch_type(&self) -> BatchType
Returns the batch type
Sourcepub fn encode(&self, w: &mut Vec<u8>) -> Result<(), SpanBatchError>
pub fn encode(&self, w: &mut Vec<u8>) -> Result<(), SpanBatchError>
Encodes the RawSpanBatch into a writer.
Sourcepub fn decode(r: &mut &[u8]) -> Result<Self, SpanBatchError>
pub fn decode(r: &mut &[u8]) -> Result<Self, SpanBatchError>
Decodes the RawSpanBatch from a reader.]
Sourcepub fn derive(
&mut self,
block_time: u64,
genesis_time: u64,
chain_id: u64,
) -> Result<SpanBatch, SpanBatchError>
pub fn derive( &mut self, block_time: u64, genesis_time: u64, chain_id: u64, ) -> Result<SpanBatch, SpanBatchError>
Converts a RawSpanBatch into a SpanBatch, which has a list of SpanBatchElements. Thos function does not populate the SpanBatch with chain configuration data, which is required for making payload attributes.
Trait Implementations§
Source§impl Clone for RawSpanBatch
impl Clone for RawSpanBatch
Source§fn clone(&self) -> RawSpanBatch
fn clone(&self) -> RawSpanBatch
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 RawSpanBatch
impl Debug for RawSpanBatch
Source§impl PartialEq for RawSpanBatch
impl PartialEq for RawSpanBatch
Source§impl TryFrom<SpanBatch> for RawSpanBatch
impl TryFrom<SpanBatch> for RawSpanBatch
impl Eq for RawSpanBatch
impl StructuralPartialEq for RawSpanBatch
Auto Trait Implementations§
impl Freeze for RawSpanBatch
impl RefUnwindSafe for RawSpanBatch
impl Send for RawSpanBatch
impl Sync for RawSpanBatch
impl Unpin for RawSpanBatch
impl UnwindSafe for RawSpanBatch
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
)