Struct solana_sdk::packet::Packet
source · [−]Fields
data: [u8; 1232]
meta: Meta
Implementations
sourceimpl Packet
impl Packet
pub fn new(data: [u8; 1232], meta: Meta) -> Self
pub fn from_data<T: Serialize>(
dest: Option<&SocketAddr>,
data: T
) -> Result<Self>
pub fn populate_packet<T: Serialize>(
packet: &mut Packet,
dest: Option<&SocketAddr>,
data: &T
) -> Result<()>
pub fn deserialize_slice<T, I>(&self, index: I) -> Result<T> where
T: DeserializeOwned,
I: SliceIndex<[u8], Output = [u8]>,
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Packet
impl Send for Packet
impl Sync for Packet
impl Unpin for Packet
impl UnwindSafe for Packet
Blanket Implementations
sourceimpl<T> AbiExample for T
impl<T> AbiExample for T
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more