pub struct Authenticate {
pub username: Option<String>,
pub password: Option<String>,
pub tokens: Vec<String>,
pub celt_versions: Vec<i32>,
pub opus: Option<bool>,
pub client_type: Option<i32>,
}
Expand description
Used by the client to send the authentication credentials to the server.
Fields§
§username: Option<String>
UTF-8 encoded username.
password: Option<String>
Server or user password.
tokens: Vec<String>
Additional access tokens for server ACL groups.
celt_versions: Vec<i32>
A list of CELT bitstream version constants supported by the client.
opus: Option<bool>
§client_type: Option<i32>
0 = REGULAR, 1 = BOT
Implementations§
Source§impl Authenticate
impl Authenticate
Sourcepub fn username(&self) -> &str
pub fn username(&self) -> &str
Returns the value of username
, or the default value if username
is unset.
Sourcepub fn password(&self) -> &str
pub fn password(&self) -> &str
Returns the value of password
, or the default value if password
is unset.
Sourcepub fn client_type(&self) -> i32
pub fn client_type(&self) -> i32
Returns the value of client_type
, or the default value if client_type
is unset.
Trait Implementations§
Source§impl Clone for Authenticate
impl Clone for Authenticate
Source§fn clone(&self) -> Authenticate
fn clone(&self) -> Authenticate
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 Authenticate
impl Debug for Authenticate
Source§impl Default for Authenticate
impl Default for Authenticate
Source§impl Message for Authenticate
impl Message for Authenticate
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Returns the encoded length of the message without a length delimiter.
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Encodes the message to a buffer. Read more
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Encodes the message to a newly allocated buffer.
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Encodes the message with a length-delimiter to a buffer. Read more
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Encodes the message with a length-delimiter to a newly allocated buffer.
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Decodes an instance of the message from a buffer. Read more
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Decodes a length-delimited instance of the message from the buffer.
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
Decodes an instance of the message from a buffer, and merges it into
self
. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
Decodes a length-delimited instance of the message from buffer, and
merges it into
self
.Source§impl PartialEq for Authenticate
impl PartialEq for Authenticate
impl StructuralPartialEq for Authenticate
Auto Trait Implementations§
impl Freeze for Authenticate
impl RefUnwindSafe for Authenticate
impl Send for Authenticate
impl Sync for Authenticate
impl Unpin for Authenticate
impl UnwindSafe for Authenticate
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