pub enum AccessToken {
NoToken,
PreSharedToken(String),
}
Expand description
A token which can be required to gain access to HTTP API
If the server receives a valid token, it will respond with a cookie carrying a session key.
Variants§
NoToken
No token needed (access must be controlled via other means).
A pre-shared token to gain access.
Trait Implementations§
source§impl Clone for AccessToken
impl Clone for AccessToken
source§fn clone(&self) -> AccessToken
fn clone(&self) -> AccessToken
Returns a copy 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 AccessToken
impl Debug for AccessToken
source§impl<'de> Deserialize<'de> for AccessToken
impl<'de> Deserialize<'de> for AccessToken
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl PartialEq for AccessToken
impl PartialEq for AccessToken
source§fn eq(&self, other: &AccessToken) -> bool
fn eq(&self, other: &AccessToken) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for AccessToken
impl Serialize for AccessToken
impl StructuralPartialEq for AccessToken
Auto Trait Implementations§
impl Freeze for AccessToken
impl RefUnwindSafe for AccessToken
impl Send for AccessToken
impl Sync for AccessToken
impl Unpin for AccessToken
impl UnwindSafe for AccessToken
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