pub struct PasswordManagerClient(pub Client);Expand description
The main entry point for the Bitwarden Password Manager SDK
Tuple Fields§
§0: ClientImplementations§
Source§impl PasswordManagerClient
impl PasswordManagerClient
Sourcepub fn new(settings: Option<ClientSettings>) -> Self
pub fn new(settings: Option<ClientSettings>) -> Self
Initialize a new instance of the SDK client
Sourcepub fn builder() -> PasswordManagerClientBuilder
pub fn builder() -> PasswordManagerClientBuilder
Returns a PasswordManagerClientBuilder for constructing a new PasswordManagerClient.
Sourcepub fn new_with_client_tokens(
settings: Option<ClientSettings>,
tokens: Arc<dyn ClientManagedTokens>,
) -> Self
pub fn new_with_client_tokens( settings: Option<ClientSettings>, tokens: Arc<dyn ClientManagedTokens>, ) -> Self
Initialize a new instance of the SDK client with client-managed tokens
Sourcepub fn new_with_sync(settings: Option<ClientSettings>) -> Self
pub fn new_with_sync(settings: Option<ClientSettings>) -> Self
Initialize a new instance of the SDK client with SDK managed state and sync handlers registered
This will eventually replace new when the SDK fully owns sync on all clients.
Sourcepub fn auth(&self) -> AuthClient
pub fn auth(&self) -> AuthClient
Auth operations
Sourcepub fn commercial(&self) -> CommercialPasswordManagerClient
pub fn commercial(&self) -> CommercialPasswordManagerClient
Bitwarden licensed operations
Sourcepub fn crypto(&self) -> CryptoClient
pub fn crypto(&self) -> CryptoClient
Crypto operations
Sourcepub fn user_crypto_management(&self) -> UserCryptoManagementClient
pub fn user_crypto_management(&self) -> UserCryptoManagementClient
Operations that manage the cryptographic machinery of a user account, including key-rotation
Sourcepub fn vault(&self) -> VaultClient
pub fn vault(&self) -> VaultClient
Vault item operations
Sourcepub fn exporters(&self) -> ExporterClient
pub fn exporters(&self) -> ExporterClient
Exporter operations
Sourcepub fn generator(&self) -> GeneratorClient
pub fn generator(&self) -> GeneratorClient
Generator operations
Sourcepub fn sends(&self) -> SendClient
pub fn sends(&self) -> SendClient
Send operations
Sourcepub fn policies(&self) -> PolicyClient
pub fn policies(&self) -> PolicyClient
Policy operations
Sourcepub fn sync(&self) -> SyncClient
pub fn sync(&self) -> SyncClient
Sync operations
Sourcepub fn is_unlocked(&self) -> bool
pub fn is_unlocked(&self) -> bool
Returns true when the user’s symmetric key is loaded into the key store.
Sourcepub async fn invalidate_session_key(&self) -> Result<(), SettingsError>
pub async fn invalidate_session_key(&self) -> Result<(), SettingsError>
Invalidate the persisted session key, locking the vault for future invocations.
Removes [SESSION_PROTECTED_USER_KEY] from the database. Distinct from
lock() on long-lived clients (mobile, desktop), which clears keys from memory: the
CLI process exits between invocations, so locking must delete the persisted session
key rather than mutate in-memory state.
Sourcepub async fn save_to_state(
data: SaveStateData,
reg: &StateRegistry,
) -> Result<(), RehydrationError>
pub async fn save_to_state( data: SaveStateData, reg: &StateRegistry, ) -> Result<(), RehydrationError>
Write rehydration state to a StateRegistry.
Delegates to Client::save_to_state.
Sourcepub async fn load_from_state(
token_handler: Arc<dyn TokenHandler>,
registry: StateRegistry,
) -> Result<Self, RehydrationError>
pub async fn load_from_state( token_handler: Arc<dyn TokenHandler>, registry: StateRegistry, ) -> Result<Self, RehydrationError>
Reconstruct a locked PasswordManagerClient from a populated StateRegistry.
Delegates to Client::load_from_state.
Auto Trait Implementations§
impl Freeze for PasswordManagerClient
impl !RefUnwindSafe for PasswordManagerClient
impl Send for PasswordManagerClient
impl Sync for PasswordManagerClient
impl Unpin for PasswordManagerClient
impl UnsafeUnpin for PasswordManagerClient
impl !UnwindSafe for PasswordManagerClient
Blanket Implementations§
§impl<T> AnySync for T
impl<T> AnySync for T
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
§impl<T> CompatExt for T
impl<T> CompatExt for T
§impl<T, UT> HandleAlloc<UT> for T
impl<T, UT> HandleAlloc<UT> for T
§fn new_handle(value: Arc<T>) -> Handle
fn new_handle(value: Arc<T>) -> Handle
§unsafe fn clone_handle(handle: Handle) -> Handle
unsafe fn clone_handle(handle: Handle) -> Handle
§unsafe fn consume_handle(handle: Handle) -> Arc<T>
unsafe fn consume_handle(handle: Handle) -> Arc<T>
Arc<> Read more§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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>
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>
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