Struct solana_ledger::shred::Shred [−][src]
pub struct Shred {
pub common_header: ShredCommonHeader,
pub data_header: DataShredHeader,
pub coding_header: CodingShredHeader,
pub payload: Vec<u8>,
}
Fields
common_header: ShredCommonHeader
data_header: DataShredHeader
coding_header: CodingShredHeader
payload: Vec<u8>
Implementations
pub fn new_from_data(
slot: Slot,
index: u32,
parent_offset: u16,
data: Option<&[u8]>,
is_last_data: bool,
is_last_in_slot: bool,
reference_tick: u8,
version: u16,
fec_set_index: u32
) -> Self
pub fn new_empty_coding(
slot: Slot,
index: u32,
fec_set_index: u32,
num_data: usize,
num_code: usize,
version: u16
) -> Self
pub fn new_empty_from_header(
common_header: ShredCommonHeader,
data_header: DataShredHeader,
coding_header: CodingShredHeader
) -> Self
This is not a safe function. It only changes the meta information. Use this only for test code which doesn’t care about actual shred
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Shred
impl UnwindSafe for Shred
Blanket Implementations
Mutably borrows from an owned value. Read more
Wrap the input message T
in a tonic::Request
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more