[][src]Struct solana::packet::Blob

pub struct Blob {
    pub meta: Meta,
    // some fields omitted
}

Fields

meta: Meta

Methods

impl Blob[src]

pub fn new(data: &[u8]) -> Self[src]

pub fn from_serializable<T: Serialize + ?Sized>(data: &T) -> Self[src]

pub fn parent(&self) -> u64[src]

pub fn set_parent(&mut self, ix: u64)[src]

pub fn version(&self) -> u64[src]

pub fn set_version(&mut self, version: u64)[src]

pub fn slot(&self) -> u64[src]

pub fn set_slot(&mut self, ix: u64)[src]

pub fn index(&self) -> u64[src]

pub fn set_index(&mut self, ix: u64)[src]

pub fn set_erasure_config(&mut self, config: &ErasureConfig)[src]

pub fn erasure_config(&self) -> ErasureConfig[src]

pub fn seed(&self) -> [u8; 32][src]

pub fn id(&self) -> Pubkey[src]

sender id, we use this for identifying if its a blob from the leader that we should retransmit. eventually blobs should have a signature that we can use for spam filtering

pub fn set_id(&mut self, id: &Pubkey)[src]

pub fn should_forward(&self) -> bool[src]

Used to determine whether or not this blob should be forwarded in retransmit A bool is used here instead of a flag because this item is not intended to be signed when blob signatures are introduced

pub fn set_forwarded(&mut self, forward: bool)[src]

Mark this blob's forwarded status

pub fn flags(&self) -> u32[src]

pub fn set_flags(&mut self, ix: u32)[src]

pub fn is_coding(&self) -> bool[src]

pub fn set_coding(&mut self)[src]

pub fn set_is_last_in_slot(&mut self)[src]

pub fn is_last_in_slot(&self) -> bool[src]

pub fn data_size(&self) -> u64[src]

pub fn set_data_size(&mut self, size: u64)[src]

pub fn data(&self) -> &[u8][src]

pub fn data_mut(&mut self) -> &mut [u8][src]

pub fn size(&self) -> usize[src]

pub fn set_size(&mut self, size: usize)[src]

pub fn get_signature_bytes(&self) -> &[u8][src]

pub fn store_packets<T: Borrow<Packet>>(&mut self, packets: &[T]) -> u64[src]

pub fn load_packets(&self, packets: &mut PinnedVec<Packet>)[src]

pub fn recv_blob(socket: &UdpSocket, r: &SharedBlob) -> Result<()>[src]

pub fn recv_from(socket: &UdpSocket) -> Result<SharedBlobs>[src]

pub fn send_to(socket: &UdpSocket, v: SharedBlobs) -> Result<()>[src]

Trait Implementations

impl Default for Blob[src]

impl Clone for Blob[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl PartialEq<Blob> for Blob[src]

impl Deref for Blob[src]

type Target = BlobData

The resulting type after dereferencing.

impl Debug for Blob[src]

impl DerefMut for Blob[src]

impl Signable for Blob[src]

fn sign(&mut self, keypair: &Keypair)[src]

fn verify(&self) -> bool[src]

Auto Trait Implementations

impl Unpin for Blob

impl Send for Blob

impl Sync for Blob

impl RefUnwindSafe for Blob

impl UnwindSafe for Blob

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Clear for T where
    T: InitializableFromZeroed + ?Sized

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> InitializableFromZeroed for T where
    T: Default

impl<T> Typeable for T where
    T: Any

fn get_type(&self) -> TypeId

Get the TypeId of this object.

impl<T> Erased for T

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

type Err = <U as TryFrom<T>>::Err