pub struct CiphersClient(pub(crate) CiphersClient);Tuple Fields§
§0: CiphersClientImplementations§
Source§impl CiphersClient
impl CiphersClient
Sourcepub async fn encrypt(
&self,
cipher_view: CipherView,
) -> Result<EncryptionContext>
pub async fn encrypt( &self, cipher_view: CipherView, ) -> Result<EncryptionContext>
Encrypt cipher
Sourcepub async fn decrypt_list(
&self,
ciphers: Vec<Cipher>,
) -> Result<Vec<CipherListView>>
pub async fn decrypt_list( &self, ciphers: Vec<Cipher>, ) -> Result<Vec<CipherListView>>
Decrypt cipher list
Sourcepub async fn encrypt_list(
&self,
cipher_views: Vec<CipherView>,
) -> Result<Vec<EncryptionContext>>
pub async fn encrypt_list( &self, cipher_views: Vec<CipherView>, ) -> Result<Vec<EncryptionContext>>
Encrypt a list of cipher views. Fails if any cipher fails to encrypt.
Sourcepub async fn decrypt_list_with_failures(
&self,
ciphers: Vec<Cipher>,
) -> Result<DecryptCipherListResult>
pub async fn decrypt_list_with_failures( &self, ciphers: Vec<Cipher>, ) -> Result<DecryptCipherListResult>
Decrypt cipher list with failures Returns both successfully decrypted ciphers and any that failed to decrypt
Sourcepub fn move_to_organization(
&self,
cipher: CipherView,
organization_id: OrganizationId,
) -> Result<CipherView>
pub fn move_to_organization( &self, cipher: CipherView, organization_id: OrganizationId, ) -> Result<CipherView>
Move a cipher to an organization, reencrypting the cipher key if necessary
Prepare ciphers for bulk share to an organization
Sourcepub async fn decrypt_list_full_with_failures(
&self,
ciphers: Vec<Cipher>,
) -> Result<DecryptCipherResult>
pub async fn decrypt_list_full_with_failures( &self, ciphers: Vec<Cipher>, ) -> Result<DecryptCipherResult>
Decrypt full cipher list Returns both successfully fully decrypted ciphers and any that failed to decrypt
Sourcepub async fn create(&self, request: CipherCreateRequest) -> Result<CipherView>
pub async fn create(&self, request: CipherCreateRequest) -> Result<CipherView>
Create a new cipher and save it to the server and local state
Sourcepub async fn edit(&self, request: CipherEditRequest) -> Result<CipherView>
pub async fn edit(&self, request: CipherEditRequest) -> Result<CipherView>
Edit an existing cipher and save it to the server and local state
Sourcepub async fn edit_gated(
&self,
request: CipherEditRequest,
original_cipher_view: CipherView,
) -> Result<CipherView>
pub async fn edit_gated( &self, request: CipherEditRequest, original_cipher_view: CipherView, ) -> Result<CipherView>
Edit a PAM-gated cipher whose secrets were revealed under an active lease.
Pass the full view obtained from the lease-authorised read as original_cipher_view. The
returned view is partial, since the server withholds secrets from a gated write-return.
Sourcepub async fn edit_partial(
&self,
request: CipherPartialEditRequest,
) -> Result<CipherView>
pub async fn edit_partial( &self, request: CipherPartialEditRequest, ) -> Result<CipherView>
Update only the folder and favorite status of a cipher, for users without edit permission
Sourcepub async fn update_collection(
&self,
cipher_id: CipherId,
collection_ids: Vec<CollectionId>,
) -> Result<CipherView>
pub async fn update_collection( &self, cipher_id: CipherId, collection_ids: Vec<CollectionId>, ) -> Result<CipherView>
Update the collections a cipher belongs to
Sourcepub async fn get(&self, cipher_id: CipherId) -> Result<CipherView>
pub async fn get(&self, cipher_id: CipherId) -> Result<CipherView>
Get a cipher from local state and decrypt it
Sourcepub async fn list(&self) -> Result<DecryptCipherListResult>
pub async fn list(&self) -> Result<DecryptCipherListResult>
Get all ciphers from local state and decrypt them to list views, returning both successes and failures
Sourcepub async fn get_all(&self) -> Result<DecryptCipherResult>
pub async fn get_all(&self) -> Result<DecryptCipherResult>
Get all ciphers from local state and fully decrypt them, returning both successes and failures
Sourcepub async fn delete(&self, cipher_id: CipherId) -> Result<()>
pub async fn delete(&self, cipher_id: CipherId) -> Result<()>
Permanently delete a cipher from the server and local state
Sourcepub async fn delete_many(
&self,
cipher_ids: Vec<CipherId>,
organization_id: Option<OrganizationId>,
) -> Result<()>
pub async fn delete_many( &self, cipher_ids: Vec<CipherId>, organization_id: Option<OrganizationId>, ) -> Result<()>
Permanently delete multiple ciphers from the server and local state
Sourcepub async fn soft_delete(&self, cipher_id: CipherId) -> Result<()>
pub async fn soft_delete(&self, cipher_id: CipherId) -> Result<()>
Move a cipher to the trash
Sourcepub async fn soft_delete_many(
&self,
cipher_ids: Vec<CipherId>,
organization_id: Option<OrganizationId>,
) -> Result<()>
pub async fn soft_delete_many( &self, cipher_ids: Vec<CipherId>, organization_id: Option<OrganizationId>, ) -> Result<()>
Move multiple ciphers to the trash
Sourcepub async fn restore(&self, cipher_id: CipherId) -> Result<CipherView>
pub async fn restore(&self, cipher_id: CipherId) -> Result<CipherView>
Restore a cipher from the trash
Sourcepub async fn restore_many(
&self,
cipher_ids: Vec<CipherId>,
) -> Result<DecryptCipherListResult>
pub async fn restore_many( &self, cipher_ids: Vec<CipherId>, ) -> Result<DecryptCipherListResult>
Restore multiple ciphers from the trash
Share a cipher with an organization, re-encrypting it with the organization key
Share multiple ciphers with an organization, re-encrypting them with the organization key
Trait Implementations§
Source§impl<UT> LiftRef<UT> for CiphersClient
impl<UT> LiftRef<UT> for CiphersClient
type LiftType = Arc<CiphersClient>
Source§impl<UT> LowerError<UT> for CiphersClient
impl<UT> LowerError<UT> for CiphersClient
Source§fn lower_error(obj: Self) -> RustBuffer
fn lower_error(obj: Self) -> RustBuffer
Source§impl<UT> LowerReturn<UT> for CiphersClient
impl<UT> LowerReturn<UT> for CiphersClient
Source§type ReturnType = <Arc<CiphersClient> as LowerReturn<UniFfiTag>>::ReturnType
type ReturnType = <Arc<CiphersClient> as LowerReturn<UniFfiTag>>::ReturnType
Source§fn lower_return(obj: Self) -> Result<Self::ReturnType, RustCallError>
fn lower_return(obj: Self) -> Result<Self::ReturnType, RustCallError>
§fn handle_failed_lift(
error: LiftArgsError,
) -> Result<Self::ReturnType, RustCallError>
fn handle_failed_lift( error: LiftArgsError, ) -> Result<Self::ReturnType, RustCallError>
Source§impl<UT> TypeId<UT> for CiphersClient
impl<UT> TypeId<UT> for CiphersClient
const TYPE_ID_META: MetadataBuffer
Auto Trait Implementations§
impl !RefUnwindSafe for CiphersClient
impl !UnwindSafe for CiphersClient
impl Freeze for CiphersClient
impl Send for CiphersClient
impl Sync for CiphersClient
impl Unpin for CiphersClient
impl UnsafeUnpin for CiphersClient
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§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> ⓘ
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