Struct solana_ledger::shred::Shred [−][src]
Fields
common_header: ShredCommonHeader
data_header: DataShredHeader
coding_header: CodingShredHeader
payload: Vec<u8>
Implementations
impl Shred
[src]
pub fn copy_to_packet(&self, packet: &mut Packet)
[src]
pub fn new_from_data(
slot: Slot,
index: u32,
parent_offset: u16,
data: Option<&[u8]>,
is_last_in_fec_set: bool,
is_last_in_slot: bool,
reference_tick: u8,
version: u16,
fec_set_index: u32
) -> Self
[src]
slot: Slot,
index: u32,
parent_offset: u16,
data: Option<&[u8]>,
is_last_in_fec_set: bool,
is_last_in_slot: bool,
reference_tick: u8,
version: u16,
fec_set_index: u32
) -> Self
pub fn new_from_serialized_shred(payload: Vec<u8>) -> Result<Self>
[src]
pub fn new_empty_coding(
slot: Slot,
index: u32,
fec_set_index: u32,
num_data: usize,
num_code: usize,
position: usize,
version: u16
) -> Self
[src]
slot: Slot,
index: u32,
fec_set_index: u32,
num_data: usize,
num_code: usize,
position: usize,
version: u16
) -> Self
pub fn new_empty_from_header(
common_header: ShredCommonHeader,
data_header: DataShredHeader,
coding_header: CodingShredHeader
) -> Self
[src]
common_header: ShredCommonHeader,
data_header: DataShredHeader,
coding_header: CodingShredHeader
) -> Self
pub fn new_empty_data_shred() -> Self
[src]
pub fn slot(&self) -> Slot
[src]
pub fn parent(&self) -> Slot
[src]
pub fn index(&self) -> u32
[src]
pub fn version(&self) -> u16
[src]
pub fn set_index(&mut self, index: u32)
[src]
pub fn set_slot(&mut self, slot: Slot)
[src]
pub fn signature(&self) -> Signature
[src]
pub fn seed(&self) -> [u8; 32]
[src]
pub fn is_data(&self) -> bool
[src]
pub fn is_code(&self) -> bool
[src]
pub fn last_in_slot(&self) -> bool
[src]
pub fn set_last_in_slot(&mut self)
[src]
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
pub fn data_complete(&self) -> bool
[src]
pub fn reference_tick(&self) -> u8
[src]
pub fn reference_tick_from_data(data: &[u8]) -> u8
[src]
pub fn verify(&self, pubkey: &Pubkey) -> bool
[src]
Trait Implementations
impl Clone for Shred
[src]
impl Debug for Shred
[src]
impl PartialEq<Shred> for Shred
[src]
impl StructuralPartialEq for Shred
[src]
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
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> IntoRequest<T> for T
[src]
pub fn into_request(self) -> Request<T>
[src]
impl<T> MaybeDebug for T where
T: Debug,
[src]
T: Debug,
impl<T> Pointable for T
[src]
pub const ALIGN: usize
[src]
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
[src]
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
[src]
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
[src]
pub unsafe fn drop(ptr: usize)
[src]
impl<T> Same<T> for T
[src]
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Typeable for T where
T: Any,
T: Any,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
[src]
V: MultiLane<T>,
impl<T> WithSubscriber for T
[src]
pub fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
[src]
S: Into<Dispatch>,