Enum solana_ledger::shred::merkle::Shred
source · pub(super) enum Shred {
ShredCode(ShredCode),
ShredData(ShredData),
}
Variants§
Implementations§
source§impl Shred
impl Shred
fn common_header(&self) -> &ShredCommonHeader
fn erasure_shard_as_slice(&self) -> Result<&[u8], Error>
fn erasure_shard_index(&self) -> Result<usize, Error>
fn merkle_node(&self) -> Result<Hash, Error>
fn payload(&self) -> &Vec<u8> ⓘ
fn sanitize(&self) -> Result<(), Error>
fn set_merkle_proof(&mut self, proof: &[&[u8; 20]]) -> Result<(), Error>
fn set_signature(&mut self, signature: Signature)
fn signed_data(&self) -> Result<Hash, Error>
fn merkle_proof(&self) -> Result<impl Iterator<Item = &[u8; 20]>, Error>
fn verify(&self, pubkey: &Pubkey) -> bool
fn signature(&self) -> &Signature
fn from_payload(shred: Vec<u8>) -> Result<Self, Error>
Trait Implementations§
source§impl PartialEq<Shred> for Shred
impl PartialEq<Shred> for Shred
impl Eq for Shred
impl StructuralEq for Shred
impl StructuralPartialEq for Shred
Auto Trait Implementations§
impl RefUnwindSafe for Shred
impl Send for Shred
impl Sync for Shred
impl Unpin for Shred
impl UnwindSafe for Shred
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