Skip to main content

RnsCompatibilityVault

Struct RnsCompatibilityVault 

Source
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,

Source

pub fn new(primary: P) -> RnsCompatibilityVault<P>

Source

pub fn adopting( self, label: IdentityLabel, reticulum_path: impl Into<PathBuf>, ) -> RnsCompatibilityVault<P>

Source

pub fn primary(&self) -> &P

Source

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,

Source§

type Error = RnsCompatibilityVaultError<<P as IdentityVault>::Error>

Source§

fn load( &self, label: &IdentityLabel, ) -> Result<Option<Zeroizing<[u8; 64]>>, <RnsCompatibilityVault<P> as IdentityVault>::Error>

Source§

fn store( &mut self, label: &IdentityLabel, secret: &[u8; 64], ) -> Result<(), <RnsCompatibilityVault<P> as IdentityVault>::Error>

Source§

fn remove( &mut self, label: &IdentityLabel, ) -> Result<Removal, <RnsCompatibilityVault<P> as IdentityVault>::Error>

Source§

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>

A buf shorter than the stored blob is the impl’s error, never a silent truncation.
Source§

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.