pub struct AuthenticationRequiredSASLMessage<'a> { /* private fields */ }
Expand description
The AuthenticationRequiredSASLMessage
struct represents a SASL authentication request.
Available fields:
-
mtype
: Identifies the message as authentication required SASL. (value ='R'
) -
mlen
: Length of message contents in bytes, including self. -
auth_status
: Specifies that this message contains a SASL authentication request. (value =0x0A
) -
methods
: A list of supported SASL authentication methods.
Implementations§
Source§impl<'a> AuthenticationRequiredSASLMessage<'a>
impl<'a> AuthenticationRequiredSASLMessage<'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 auth_status(&self) -> i32
pub fn auth_status(&self) -> i32
Specifies that this message contains a SASL authentication request.
Sourcepub fn methods(&self) -> Array<'a, i32, LString<'a>>
pub fn methods(&self) -> Array<'a, i32, LString<'a>>
A list of supported SASL authentication methods.
pub fn to_vec(self) -> Vec<u8> ⓘ
Trait Implementations§
Source§impl AsRef<[u8]> for AuthenticationRequiredSASLMessage<'_>
impl AsRef<[u8]> for AuthenticationRequiredSASLMessage<'_>
Source§impl<'a> Clone for AuthenticationRequiredSASLMessage<'a>
impl<'a> Clone for AuthenticationRequiredSASLMessage<'a>
Source§fn clone(&self) -> AuthenticationRequiredSASLMessage<'a>
fn clone(&self) -> AuthenticationRequiredSASLMessage<'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 AuthenticationRequiredSASLMessage<'a>
impl<'a> DataType for AuthenticationRequiredSASLMessage<'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 AuthenticationRequiredSASLMessage<'_>
impl Debug for AuthenticationRequiredSASLMessage<'_>
Source§impl<'a> DecoderFor<'a, AuthenticationRequiredSASLMessage<'a>> for AuthenticationRequiredSASLMessage<'a>
impl<'a> DecoderFor<'a, AuthenticationRequiredSASLMessage<'a>> for AuthenticationRequiredSASLMessage<'a>
fn decode_for(buf: &mut &'a [u8]) -> Result<Self, ParseError>
Source§impl<'a> Default for AuthenticationRequiredSASLMessage<'a>
impl<'a> Default for AuthenticationRequiredSASLMessage<'a>
Source§fn default() -> AuthenticationRequiredSASLMessage<'a>
fn default() -> AuthenticationRequiredSASLMessage<'a>
Source§impl<METHODS> EncoderFor<AuthenticationRequiredSASLMessage<'static>> for &AuthenticationRequiredSASLMessageBuilder<METHODS>
impl<METHODS> EncoderFor<AuthenticationRequiredSASLMessage<'static>> for &AuthenticationRequiredSASLMessageBuilder<METHODS>
fn encode_for(&self, buf: &mut BufWriter<'_>)
Source§impl<'a> EncoderFor<AuthenticationRequiredSASLMessage<'static>> for AuthenticationRequiredSASLMessage<'a>
impl<'a> EncoderFor<AuthenticationRequiredSASLMessage<'static>> for AuthenticationRequiredSASLMessage<'a>
fn encode_for(&self, buf: &mut BufWriter<'_>)
Source§impl<METHODS> EncoderFor<AuthenticationRequiredSASLMessage<'static>> for AuthenticationRequiredSASLMessageBuilder<METHODS>
impl<METHODS> EncoderFor<AuthenticationRequiredSASLMessage<'static>> for AuthenticationRequiredSASLMessageBuilder<METHODS>
fn encode_for(&self, buf: &mut BufWriter<'_>)
Source§impl PartialEq for AuthenticationRequiredSASLMessage<'_>
impl PartialEq for AuthenticationRequiredSASLMessage<'_>
Source§impl<'a> StructMeta for AuthenticationRequiredSASLMessage<'a>
Implements a trait containing the fields of the struct, allowing
us to compute some useful things.
impl<'a> StructMeta for AuthenticationRequiredSASLMessage<'a>
Implements a trait containing the fields of the struct, allowing us to compute some useful things.
const FIELDS: StructFields
type Struct<'__struct> = AuthenticationRequiredSASLMessage<'__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 AuthenticationRequiredSASLMessage<'a>
impl Eq for AuthenticationRequiredSASLMessage<'_>
impl StructAttributeFieldCount<{<$name<'_> as $crate::prelude::StructMeta>::FIELD_COUNT}> for AuthenticationRequiredSASLMessage<'_>
Implements a trait indicating that the struct has a field count.
impl StructAttributeFixedSize<{<$name<'_> as $crate::prelude::StructMeta>::IS_FIXED_SIZE}> for AuthenticationRequiredSASLMessage<'_>
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 AuthenticationRequiredSASLMessage<'_>
Implements a trait indicating that the struct has a length field.