pub struct Dump3<'a> { /* private fields */ }
Expand description
The Dump3
struct represents a dump message from the client.
Available fields:
-
mtype
: Identifies the message as dump. (value ='>'
) -
mlen
: Length of message contents in bytes, including self. -
annotations
: Message annotations. -
flags
: A bit mask of dump options.
Implementations§
Source§impl<'a> Dump3<'a>
impl<'a> Dump3<'a>
Sourcepub const fn is_buffer(buf: &'a [u8]) -> bool
pub const fn is_buffer(buf: &'a [u8]) -> bool
Checks the constant values for this struct to determine whether this message matches.
Sourcepub fn new(buf: &'a [u8]) -> Result<Self, ParseError>
pub fn new(buf: &'a [u8]) -> Result<Self, ParseError>
Creates a new instance of this struct from a given buffer.
Sourcepub fn annotations(&self) -> Array<'a, i16, Annotation<'a>>
pub fn annotations(&self) -> Array<'a, i16, Annotation<'a>>
Message annotations.
pub fn to_vec(self) -> Vec<u8> ⓘ
Trait Implementations§
Source§impl<'a> DataType for Dump3<'a>
impl<'a> DataType for Dump3<'a>
const META: StructFieldMeta
fn encode_usize(buf: &mut BufWriter<'_>, value: usize)
fn decode_usize(buf: &mut &[u8]) -> Result<usize, ParseError>
Source§impl<'a> DecoderFor<'a, Dump3<'a>> for Dump3<'a>
impl<'a> DecoderFor<'a, Dump3<'a>> for Dump3<'a>
fn decode_for(buf: &mut &'a [u8]) -> Result<Self, ParseError>
Source§impl<ANNOTATIONS, FLAGS> EncoderFor<Dump3<'static>> for &Dump3Builder<ANNOTATIONS, FLAGS>
impl<ANNOTATIONS, FLAGS> EncoderFor<Dump3<'static>> for &Dump3Builder<ANNOTATIONS, FLAGS>
fn encode_for(&self, buf: &mut BufWriter<'_>)
Source§impl<'a> EncoderFor<Dump3<'static>> for Dump3<'a>
impl<'a> EncoderFor<Dump3<'static>> for Dump3<'a>
fn encode_for(&self, buf: &mut BufWriter<'_>)
Source§impl<ANNOTATIONS, FLAGS> EncoderFor<Dump3<'static>> for Dump3Builder<ANNOTATIONS, FLAGS>
impl<ANNOTATIONS, FLAGS> EncoderFor<Dump3<'static>> for Dump3Builder<ANNOTATIONS, FLAGS>
fn encode_for(&self, buf: &mut BufWriter<'_>)
Source§impl<'a> StructMeta for Dump3<'a>
Implements a trait containing the fields of the struct, allowing
us to compute some useful things.
impl<'a> StructMeta for Dump3<'a>
Implements a trait containing the fields of the struct, allowing us to compute some useful things.
const FIELDS: StructFields
type Struct<'__struct> = Dump3<'__struct>
fn new<'__next_lifetime>( buf: &'__next_lifetime [u8], ) -> Result<Self::Struct<'__next_lifetime>, ParseError>
fn to_vec(&self) -> Vec<u8> ⓘ
const FIELD_COUNT: usize = _
const IS_FIXED_SIZE: bool = _
const FIXED_SIZE: Option<usize> = _
const LENGTH_FIELD_INDEX: Option<usize> = _
const HAS_LENGTH_FIELD: bool = _
impl<'a> Copy for Dump3<'a>
impl Eq for Dump3<'_>
impl StructAttributeFieldCount<{<$name<'_> as $crate::prelude::StructMeta>::FIELD_COUNT}> for Dump3<'_>
Implements a trait indicating that the struct has a field count.
impl StructAttributeFixedSize<{<$name<'_> as $crate::prelude::StructMeta>::IS_FIXED_SIZE}> for Dump3<'_>
Implements a trait indicating that the struct has a fixed size. This needs to be a trait-generic rather than and associated constant for us to use elsewhere.
impl StructAttributeHasLengthField<{<$name<'_> as $crate::prelude::StructMeta>::HAS_LENGTH_FIELD}> for Dump3<'_>
Implements a trait indicating that the struct has a length field.