pub struct RnsCompatibilityVault<P>where
P: IdentityVault,{ /* private fields */ }Expand description
The primary vault answers first; on a miss, registered stock Reticulum identity files are read through, never written back.
Implementations§
Source§impl<P> RnsCompatibilityVault<P>where
P: IdentityVault,
impl<P> RnsCompatibilityVault<P>where
P: IdentityVault,
pub fn new(primary: P) -> RnsCompatibilityVault<P>
pub fn adopting( self, label: IdentityLabel, reticulum_path: impl Into<PathBuf>, ) -> RnsCompatibilityVault<P>
pub fn primary(&self) -> &P
pub fn load_reporting( &self, label: &IdentityLabel, ) -> Result<Option<(Zeroizing<[u8; 64]>, LoadSource)>, RnsCompatibilityVaultError<<P as IdentityVault>::Error>>
Trait Implementations§
Source§impl<P> IdentityVault for RnsCompatibilityVault<P>where
P: IdentityVault,
impl<P> IdentityVault for RnsCompatibilityVault<P>where
P: IdentityVault,
type Error = RnsCompatibilityVaultError<<P as IdentityVault>::Error>
fn load( &self, label: &IdentityLabel, ) -> Result<Option<Zeroizing<[u8; 64]>>, <RnsCompatibilityVault<P> as IdentityVault>::Error>
fn store( &mut self, label: &IdentityLabel, secret: &[u8; 64], ) -> Result<(), <RnsCompatibilityVault<P> as IdentityVault>::Error>
fn remove( &mut self, label: &IdentityLabel, ) -> Result<Removal, <RnsCompatibilityVault<P> as IdentityVault>::Error>
fn stored_blob_len( &self, label: &IdentityLabel, ) -> Result<Option<usize>, <RnsCompatibilityVault<P> as IdentityVault>::Error>
Source§fn load_blob<'b>(
&self,
label: &IdentityLabel,
buf: &'b mut [u8],
) -> Result<Option<&'b [u8]>, <RnsCompatibilityVault<P> as IdentityVault>::Error>
fn load_blob<'b>( &self, label: &IdentityLabel, buf: &'b mut [u8], ) -> Result<Option<&'b [u8]>, <RnsCompatibilityVault<P> as IdentityVault>::Error>
A
buf shorter than the stored blob is the impl’s error, never a silent truncation.fn store_blob( &mut self, label: &IdentityLabel, blob: &[u8], ) -> Result<(), <RnsCompatibilityVault<P> as IdentityVault>::Error>
Auto Trait Implementations§
impl<P> Freeze for RnsCompatibilityVault<P>where
P: Freeze,
impl<P> RefUnwindSafe for RnsCompatibilityVault<P>where
P: RefUnwindSafe,
impl<P> Send for RnsCompatibilityVault<P>where
P: Send,
impl<P> Sync for RnsCompatibilityVault<P>where
P: Sync,
impl<P> Unpin for RnsCompatibilityVault<P>where
P: Unpin,
impl<P> UnsafeUnpin for RnsCompatibilityVault<P>where
P: UnsafeUnpin,
impl<P> UnwindSafe for RnsCompatibilityVault<P>where
P: UnwindSafe,
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