pub struct BytesPacket { /* private fields */ }👎Deprecated since 3.1.0: This crate has been marked for formal inclusion in the Agave Unstable API. From v4.0.0 onward, the
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.Expand description
Representation of a packet used in TPU.
Implementations§
Source§impl BytesPacket
impl BytesPacket
pub fn new(buffer: Bytes, meta: Meta) -> Self
👎Deprecated since 3.1.0: This crate has been marked for formal inclusion in the Agave Unstable API. From v4.0.0 onward, the
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.pub fn data<I>(&self, index: I) -> Option<&<I as SliceIndex<[u8]>>::Output>where
I: SliceIndex<[u8]>,
👎Deprecated since 3.1.0: This crate has been marked for formal inclusion in the Agave Unstable API. From v4.0.0 onward, the
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.pub fn meta(&self) -> &Meta
👎Deprecated since 3.1.0: This crate has been marked for formal inclusion in the Agave Unstable API. From v4.0.0 onward, the
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.pub fn meta_mut(&mut self) -> &mut Meta
👎Deprecated since 3.1.0: This crate has been marked for formal inclusion in the Agave Unstable API. From v4.0.0 onward, the
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.pub fn deserialize_slice<T, I>(&self, index: I) -> Result<T>
👎Deprecated since 3.1.0: This crate has been marked for formal inclusion in the Agave Unstable API. From v4.0.0 onward, the
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.pub fn as_ref(&self) -> PacketRef<'_>
👎Deprecated since 3.1.0: This crate has been marked for formal inclusion in the Agave Unstable API. From v4.0.0 onward, the
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.pub fn as_mut(&mut self) -> PacketRefMut<'_>
👎Deprecated since 3.1.0: This crate has been marked for formal inclusion in the Agave Unstable API. From v4.0.0 onward, the
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.pub fn buffer(&self) -> &Bytes
👎Deprecated since 3.1.0: This crate has been marked for formal inclusion in the Agave Unstable API. From v4.0.0 onward, the
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.pub fn set_buffer(&mut self, buffer: impl Into<Bytes>)
👎Deprecated since 3.1.0: This crate has been marked for formal inclusion in the Agave Unstable API. From v4.0.0 onward, the
agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.Trait Implementations§
Source§impl Clone for BytesPacket
impl Clone for BytesPacket
Source§fn clone(&self) -> BytesPacket
fn clone(&self) -> BytesPacket
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for BytesPacket
impl Debug for BytesPacket
Source§impl<'de> Deserialize<'de> for BytesPacket
impl<'de> Deserialize<'de> for BytesPacket
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<'a> From<&'a BytesPacket> for PacketRef<'a>
impl<'a> From<&'a BytesPacket> for PacketRef<'a>
Source§fn from(packet: &'a BytesPacket) -> Self
fn from(packet: &'a BytesPacket) -> Self
Converts to this type from the input type.
Source§impl<'a> From<&'a mut BytesPacket> for PacketRef<'a>
impl<'a> From<&'a mut BytesPacket> for PacketRef<'a>
Source§fn from(packet: &'a mut BytesPacket) -> Self
fn from(packet: &'a mut BytesPacket) -> Self
Converts to this type from the input type.
Source§impl<'a> From<&'a mut BytesPacket> for PacketRefMut<'a>
impl<'a> From<&'a mut BytesPacket> for PacketRefMut<'a>
Source§fn from(packet: &'a mut BytesPacket) -> Self
fn from(packet: &'a mut BytesPacket) -> Self
Converts to this type from the input type.
Source§impl FromIterator<BytesPacket> for BytesPacketBatch
impl FromIterator<BytesPacket> for BytesPacketBatch
Source§fn from_iter<T: IntoIterator<Item = BytesPacket>>(iter: T) -> Self
fn from_iter<T: IntoIterator<Item = BytesPacket>>(iter: T) -> Self
Creates a value from an iterator. Read more
Source§impl PartialEq for BytesPacket
impl PartialEq for BytesPacket
Source§impl Serialize for BytesPacket
impl Serialize for BytesPacket
impl Eq for BytesPacket
impl StructuralPartialEq for BytesPacket
Auto Trait Implementations§
impl !Freeze for BytesPacket
impl RefUnwindSafe for BytesPacket
impl Send for BytesPacket
impl Sync for BytesPacket
impl Unpin for BytesPacket
impl UnwindSafe for BytesPacket
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more