Enum solana_ledger::shred::shred_data::ShredData
source · pub enum ShredData {
Legacy(ShredData),
Merkle(ShredData),
}
Variants§
Implementations§
source§impl ShredData
impl ShredData
fn data_header(&self) -> &DataShredHeader
pub(super) fn common_header(&self) -> &ShredCommonHeader
pub(super) fn data(&self) -> Result<&[u8], Error>
pub(super) fn erasure_shard(self) -> Result<Vec<u8>, Error>
pub(super) fn erasure_shard_as_slice(&self) -> Result<&[u8], Error>
pub(super) fn erasure_shard_index(&self) -> Result<usize, Error>
pub(super) fn into_payload(self) -> Vec<u8> ⓘ
pub(super) fn parent(&self) -> Result<Slot, Error>
pub(super) fn payload(&self) -> &Vec<u8> ⓘ
pub(super) fn sanitize(&self) -> Result<(), Error>
pub(super) fn set_signature(&mut self, signature: Signature)
pub(super) fn set_index(&mut self, index: u32)
pub(super) fn set_slot(&mut self, slot: Slot)
pub(super) fn signed_data(&self) -> Result<SignedData<'_>, Error>
pub(super) fn new_from_data( slot: Slot, index: u32, parent_offset: u16, data: &[u8], flags: ShredFlags, reference_tick: u8, version: u16, fec_set_index: u32 ) -> Self
pub(super) fn last_in_slot(&self) -> bool
pub(super) fn data_complete(&self) -> bool
pub(super) fn reference_tick(&self) -> u8
pub(super) fn bytes_to_store(&self) -> &[u8] ⓘ
pub(crate) fn resize_stored_shred(shred: Vec<u8>) -> Result<Vec<u8>, Error>
pub fn capacity(merkle_proof_size: Option<u8>) -> Result<usize, Error>
pub(super) fn set_last_in_slot(&mut self)
Trait Implementations§
source§impl PartialEq<ShredData> for ShredData
impl PartialEq<ShredData> for ShredData
impl Eq for ShredData
impl StructuralEq for ShredData
impl StructuralPartialEq for ShredData
Auto Trait Implementations§
impl RefUnwindSafe for ShredData
impl Send for ShredData
impl Sync for ShredData
impl Unpin for ShredData
impl UnwindSafe for ShredData
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
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request