pub struct CommandComplete<'a> { /* private fields */ }
Expand description
The CommandComplete
struct represents a message indicating a command has completed.
Available fields:
-
mtype
: Identifies the message as command complete. (value ='C'
) -
mlen
: Length of message contents in bytes, including self. -
annotations
: Message annotations. -
capabilities
: A bit mask of allowed capabilities. -
status
: Command status. -
state_typedesc_id
: State data descriptor ID. -
state_data
: Encoded state data.
Implementations§
Source§impl<'a> CommandComplete<'a>
impl<'a> CommandComplete<'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.
Sourcepub fn capabilities(&self) -> u64
pub fn capabilities(&self) -> u64
A bit mask of allowed capabilities.
Sourcepub fn state_typedesc_id(&self) -> Uuid
pub fn state_typedesc_id(&self) -> Uuid
State data descriptor ID.
Sourcepub fn state_data(&self) -> Array<'a, u32, u8>
pub fn state_data(&self) -> Array<'a, u32, u8>
Encoded state data.
pub fn to_vec(self) -> Vec<u8> ⓘ
Trait Implementations§
Source§impl AsRef<[u8]> for CommandComplete<'_>
impl AsRef<[u8]> for CommandComplete<'_>
Source§impl<'a> Clone for CommandComplete<'a>
impl<'a> Clone for CommandComplete<'a>
Source§fn clone(&self) -> CommandComplete<'a>
fn clone(&self) -> CommandComplete<'a>
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl<'a> DataType for CommandComplete<'a>
impl<'a> DataType for CommandComplete<'a>
const META: StructFieldMeta
fn encode_usize(buf: &mut BufWriter<'_>, value: usize)
fn decode_usize(buf: &mut &[u8]) -> Result<usize, ParseError>
Source§impl Debug for CommandComplete<'_>
impl Debug for CommandComplete<'_>
Source§impl<'a> DecoderFor<'a, CommandComplete<'a>> for CommandComplete<'a>
impl<'a> DecoderFor<'a, CommandComplete<'a>> for CommandComplete<'a>
fn decode_for(buf: &mut &'a [u8]) -> Result<Self, ParseError>
Source§impl<'a> Default for CommandComplete<'a>
impl<'a> Default for CommandComplete<'a>
Source§fn default() -> CommandComplete<'a>
fn default() -> CommandComplete<'a>
Source§impl<ANNOTATIONS, CAPABILITIES, STATUS, STATE_TYPEDESC_ID, STATE_DATA> EncoderFor<CommandComplete<'static>> for &CommandCompleteBuilder<ANNOTATIONS, CAPABILITIES, STATUS, STATE_TYPEDESC_ID, STATE_DATA>where
ANNOTATIONS: EncoderFor<Array<'static, i16, Annotation<'static>>>,
CAPABILITIES: EncoderFor<u64>,
STATUS: EncoderFor<LString<'static>>,
STATE_TYPEDESC_ID: EncoderFor<Uuid>,
STATE_DATA: EncoderFor<Array<'static, u32, u8>>,
impl<ANNOTATIONS, CAPABILITIES, STATUS, STATE_TYPEDESC_ID, STATE_DATA> EncoderFor<CommandComplete<'static>> for &CommandCompleteBuilder<ANNOTATIONS, CAPABILITIES, STATUS, STATE_TYPEDESC_ID, STATE_DATA>where
ANNOTATIONS: EncoderFor<Array<'static, i16, Annotation<'static>>>,
CAPABILITIES: EncoderFor<u64>,
STATUS: EncoderFor<LString<'static>>,
STATE_TYPEDESC_ID: EncoderFor<Uuid>,
STATE_DATA: EncoderFor<Array<'static, u32, u8>>,
fn encode_for(&self, buf: &mut BufWriter<'_>)
Source§impl<'a> EncoderFor<CommandComplete<'static>> for CommandComplete<'a>
impl<'a> EncoderFor<CommandComplete<'static>> for CommandComplete<'a>
fn encode_for(&self, buf: &mut BufWriter<'_>)
Source§impl<ANNOTATIONS, CAPABILITIES, STATUS, STATE_TYPEDESC_ID, STATE_DATA> EncoderFor<CommandComplete<'static>> for CommandCompleteBuilder<ANNOTATIONS, CAPABILITIES, STATUS, STATE_TYPEDESC_ID, STATE_DATA>where
ANNOTATIONS: EncoderFor<Array<'static, i16, Annotation<'static>>>,
CAPABILITIES: EncoderFor<u64>,
STATUS: EncoderFor<LString<'static>>,
STATE_TYPEDESC_ID: EncoderFor<Uuid>,
STATE_DATA: EncoderFor<Array<'static, u32, u8>>,
impl<ANNOTATIONS, CAPABILITIES, STATUS, STATE_TYPEDESC_ID, STATE_DATA> EncoderFor<CommandComplete<'static>> for CommandCompleteBuilder<ANNOTATIONS, CAPABILITIES, STATUS, STATE_TYPEDESC_ID, STATE_DATA>where
ANNOTATIONS: EncoderFor<Array<'static, i16, Annotation<'static>>>,
CAPABILITIES: EncoderFor<u64>,
STATUS: EncoderFor<LString<'static>>,
STATE_TYPEDESC_ID: EncoderFor<Uuid>,
STATE_DATA: EncoderFor<Array<'static, u32, u8>>,
fn encode_for(&self, buf: &mut BufWriter<'_>)
Source§impl PartialEq for CommandComplete<'_>
impl PartialEq for CommandComplete<'_>
Source§impl<'a> StructMeta for CommandComplete<'a>
Implements a trait containing the fields of the struct, allowing
us to compute some useful things.
impl<'a> StructMeta for CommandComplete<'a>
Implements a trait containing the fields of the struct, allowing us to compute some useful things.
const FIELDS: StructFields
type Struct<'__struct> = CommandComplete<'__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 CommandComplete<'a>
impl Eq for CommandComplete<'_>
impl StructAttributeFieldCount<{<$name<'_> as $crate::prelude::StructMeta>::FIELD_COUNT}> for CommandComplete<'_>
Implements a trait indicating that the struct has a field count.
impl StructAttributeFixedSize<{<$name<'_> as $crate::prelude::StructMeta>::IS_FIXED_SIZE}> for CommandComplete<'_>
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 CommandComplete<'_>
Implements a trait indicating that the struct has a length field.