Struct modio::auth::Credentials
source · pub struct Credentials {
pub api_key: String,
pub token: Option<Token>,
}
Expand description
mod.io credentials. API key with optional OAuth2 access token.
Fields§
§api_key: String
§token: Option<Token>
Implementations§
source§impl Credentials
impl Credentials
pub fn new<S: Into<String>>(api_key: S) -> Credentials
pub fn with_token<S: Into<String>, T: Into<String>>( api_key: S, token: T ) -> Credentials
Trait Implementations§
source§impl Clone for Credentials
impl Clone for Credentials
source§fn clone(&self) -> Credentials
fn clone(&self) -> Credentials
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 Credentials
impl Debug for Credentials
source§impl From<&str> for Credentials
impl From<&str> for Credentials
source§fn from(api_key: &str) -> Credentials
fn from(api_key: &str) -> Credentials
Converts to this type from the input type.
source§impl From<String> for Credentials
impl From<String> for Credentials
source§fn from(api_key: String) -> Credentials
fn from(api_key: String) -> Credentials
Converts to this type from the input type.
source§impl PartialEq for Credentials
impl PartialEq for Credentials
source§fn eq(&self, other: &Credentials) -> bool
fn eq(&self, other: &Credentials) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for Credentials
impl StructuralPartialEq for Credentials
Auto Trait Implementations§
impl Freeze for Credentials
impl RefUnwindSafe for Credentials
impl Send for Credentials
impl Sync for Credentials
impl Unpin for Credentials
impl UnwindSafe for Credentials
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