pub enum Authentication<'a> {
Bot {
token: &'a str,
},
User {
session_token: &'a str,
},
}Expand description
A value that can be used to authenticate on the websocket, either as a bot or as a non-bot user.
Variants§
Trait Implementations§
Source§impl<'a> Clone for Authentication<'a>
impl<'a> Clone for Authentication<'a>
Source§fn clone(&self) -> Authentication<'a>
fn clone(&self) -> Authentication<'a>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'a> Debug for Authentication<'a>
impl<'a> Debug for Authentication<'a>
Source§impl<'a> From<&'a Session> for Authentication<'a>
impl<'a> From<&'a Session> for Authentication<'a>
Source§impl<'a> Hash for Authentication<'a>
impl<'a> Hash for Authentication<'a>
Source§impl<'a> Ord for Authentication<'a>
impl<'a> Ord for Authentication<'a>
Source§fn cmp(&self, other: &Authentication<'a>) -> Ordering
fn cmp(&self, other: &Authentication<'a>) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<'a> PartialEq for Authentication<'a>
impl<'a> PartialEq for Authentication<'a>
Source§fn eq(&self, other: &Authentication<'a>) -> bool
fn eq(&self, other: &Authentication<'a>) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl<'a> PartialOrd for Authentication<'a>
impl<'a> PartialOrd for Authentication<'a>
impl<'a> Copy for Authentication<'a>
impl<'a> Eq for Authentication<'a>
impl<'a> StructuralPartialEq for Authentication<'a>
Auto Trait Implementations§
impl<'a> Freeze for Authentication<'a>
impl<'a> RefUnwindSafe for Authentication<'a>
impl<'a> Send for Authentication<'a>
impl<'a> Sync for Authentication<'a>
impl<'a> Unpin for Authentication<'a>
impl<'a> UnsafeUnpin for Authentication<'a>
impl<'a> UnwindSafe for Authentication<'a>
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