pub struct AuthManager { /* private fields */ }Implementations§
Source§impl AuthManager
impl AuthManager
Sourcepub fn store_token(&mut self, server_url: &str, token: &str) -> Result<()>
pub fn store_token(&mut self, server_url: &str, token: &str) -> Result<()>
Store an authentication token for a Bitbucket server
Sourcepub fn get_token(&self, server_url: &str) -> Option<&String>
pub fn get_token(&self, server_url: &str) -> Option<&String>
Retrieve an authentication token for a Bitbucket server
Sourcepub fn remove_token(&mut self, server_url: &str) -> Result<bool>
pub fn remove_token(&mut self, server_url: &str) -> Result<bool>
Remove an authentication token
Sourcepub fn list_servers(&self) -> Vec<&String>
pub fn list_servers(&self) -> Vec<&String>
List all configured servers
Sourcepub fn set_default_server(&mut self, server_url: &str) -> Result<()>
pub fn set_default_server(&mut self, server_url: &str) -> Result<()>
Set the default server
Sourcepub fn get_default_server(&self) -> Option<&String>
pub fn get_default_server(&self) -> Option<&String>
Get the default server
Sourcepub fn validate_auth(&self, server_url: &str) -> Result<()>
pub fn validate_auth(&self, server_url: &str) -> Result<()>
Validate that we have authentication for a server
Auto Trait Implementations§
impl Freeze for AuthManager
impl RefUnwindSafe for AuthManager
impl Send for AuthManager
impl Sync for AuthManager
impl Unpin for AuthManager
impl UnwindSafe for AuthManager
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more