pub struct ConnectionOptions {
pub username: String,
pub password: Option<String>,
pub token: Option<String>,
}
Fields§
§username: String
§password: Option<String>
Provide this if you want to authenticate with a password.
token: Option<String>
Provide this if you want to authenticate with a token.
If you do not have a token you can use ConnectionOptions::with_password.
Implementations§
source§impl ConnectionOptions
impl ConnectionOptions
pub fn new_with_token(username: String, token: String) -> Self
pub fn new_with_password(username: String, password: String) -> Self
pub fn with_token(self, token: String) -> Self
pub fn with_password(self, token: String) -> Self
pub fn from_enterprise() -> Result<Self, ()>
Trait Implementations§
source§impl Clone for ConnectionOptions
impl Clone for ConnectionOptions
source§fn clone(&self) -> ConnectionOptions
fn clone(&self) -> ConnectionOptions
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 ConnectionOptions
impl Debug for ConnectionOptions
source§impl Hash for ConnectionOptions
impl Hash for ConnectionOptions
source§impl PartialEq for ConnectionOptions
impl PartialEq for ConnectionOptions
impl Eq for ConnectionOptions
impl StructuralPartialEq for ConnectionOptions
Auto Trait Implementations§
impl Freeze for ConnectionOptions
impl RefUnwindSafe for ConnectionOptions
impl Send for ConnectionOptions
impl Sync for ConnectionOptions
impl Unpin for ConnectionOptions
impl UnwindSafe for ConnectionOptions
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