pub enum PacketRef<'a> {
Packet(&'a Packet),
Bytes(&'a BytesPacket),
}👎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.Variants§
Packet(&'a Packet)
👎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.Bytes(&'a BytesPacket)
👎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.Implementations§
Source§impl<'a> PacketRef<'a>
impl<'a> PacketRef<'a>
pub fn data<I>(&self, index: I) -> Option<&'a <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 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 to_bytes_packet(&self) -> BytesPacket
👎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<'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.
impl<'a> Copy for PacketRef<'a>
impl<'a> Eq for PacketRef<'a>
Auto Trait Implementations§
impl<'a> Freeze for PacketRef<'a>
impl<'a> RefUnwindSafe for PacketRef<'a>
impl<'a> Send for PacketRef<'a>
impl<'a> Sync for PacketRef<'a>
impl<'a> Unpin for PacketRef<'a>
impl<'a> UnwindSafe for PacketRef<'a>
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