pub struct AppPassword { /* private fields */ }Expand description
A Nextcloud user name paired with an app password.
Nextcloud recommends app passwords over the account password for clients: they can be revoked individually and never expose the primary login.
Implementations§
Source§impl AppPassword
impl AppPassword
Sourcepub fn new(user: impl Into<String>, password: SecretString) -> Self
pub fn new(user: impl Into<String>, password: SecretString) -> Self
Builds credentials from a user name and its app password.
Sourcepub fn password(&self) -> &SecretString
pub fn password(&self) -> &SecretString
The app password.
Reading the plaintext is explicit so no accidental Debug or log line
can pick it up.
Trait Implementations§
Source§impl Clone for AppPassword
impl Clone for AppPassword
Auto Trait Implementations§
impl Freeze for AppPassword
impl RefUnwindSafe for AppPassword
impl Send for AppPassword
impl Sync for AppPassword
impl Unpin for AppPassword
impl UnsafeUnpin for AppPassword
impl UnwindSafe for AppPassword
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