pub struct AuthRequest(pub Vec<AuthMethod>);Expand description
AuthRequest message:
+----------+----------+
| NMETHODS | METHODS |
+----------+----------+
| 1 | 1 to 255 |
+----------+----------+
Tuple Fields§
§0: Vec<AuthMethod>Implementations§
Source§impl AuthRequest
impl AuthRequest
Sourcepub fn new(methods: impl Into<Vec<AuthMethod>>) -> AuthRequest
pub fn new(methods: impl Into<Vec<AuthMethod>>) -> AuthRequest
Create an AuthRequest.
Sourcepub async fn read(reader: impl AsyncRead + Unpin) -> Result<AuthRequest>
pub async fn read(reader: impl AsyncRead + Unpin) -> Result<AuthRequest>
Read AuthRequest from AsyncRead.
Sourcepub async fn write(&self, writer: impl AsyncWrite + Unpin) -> Result<()>
pub async fn write(&self, writer: impl AsyncWrite + Unpin) -> Result<()>
Write AuthRequest to AsyncWrite.
Sourcepub fn select_from(&self, auth: &[AuthMethod]) -> AuthMethod
pub fn select_from(&self, auth: &[AuthMethod]) -> AuthMethod
Select one AuthMethod from give slice.
Trait Implementations§
Source§impl Clone for AuthRequest
impl Clone for AuthRequest
Source§fn clone(&self) -> AuthRequest
fn clone(&self) -> AuthRequest
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 AuthRequest
impl Debug for AuthRequest
Source§impl FromIO for AuthRequest
impl FromIO for AuthRequest
Source§impl PartialEq for AuthRequest
impl PartialEq for AuthRequest
impl Eq for AuthRequest
impl StructuralPartialEq for AuthRequest
Auto Trait Implementations§
impl Freeze for AuthRequest
impl RefUnwindSafe for AuthRequest
impl Send for AuthRequest
impl Sync for AuthRequest
impl Unpin for AuthRequest
impl UnwindSafe for AuthRequest
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