Skip to main content

EncryptedStore

Struct EncryptedStore 

Source
pub struct EncryptedStore<S, K> { /* private fields */ }

Implementations§

Source§

impl<S, K> EncryptedStore<S, K>

Source

pub fn new(store: S, key: K) -> Self

Trait Implementations§

Source§

impl<S: Clone, K: Clone> Clone for EncryptedStore<S, K>

Source§

fn clone(&self) -> EncryptedStore<S, K>

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<S: ExternalStore, K: Key> ExternalStore for EncryptedStore<S, K>

Source§

type Id = <S as ExternalStore>::Id

Source§

async fn save_data( &self, data: &[u8], refs: &[Self::Id], wh: WithHash<'_, impl ToOutput>, ) -> Result<Self::Id>

Source§

async fn contains_data( &self, data: &[u8], refs: &[Self::Id], wh: WithHash<'_, impl Send + Sync + ToOutput>, ) -> Result<bool>

Source§

async fn contains(&self, id: &Self::Id) -> Result<bool>

Source§

async fn fetch(&self, id: &Self::Id) -> Result<Vec<u8>>

Source§

fn store_point<T>( &self, fetch: impl SingularFetch<T = T> + 'static, ) -> impl RainbowFuture<T = Self::Id>
where T: Traversible, Self: PartialEq,

Source§

fn store_object<T>(&self, object: T) -> impl RainbowFuture<T = Self::Id>
where T: Traversible, Self: PartialEq,

Source§

fn load_extra<T, E>(&self, id: &Self::Id, extra: E) -> impl RainbowFuture<T = T>
where T: ParseSliceExtra<E> + Tagged, E: 'static + Send + Sync + Clone,

Source§

fn load<T>(&self, id: &Self::Id) -> impl RainbowFuture<T = T>
where T: ParseSlice + Tagged,

Source§

impl<S: PartialEq, K: PartialEq> PartialEq for EncryptedStore<S, K>

Source§

fn eq(&self, other: &EncryptedStore<S, K>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<S, K> StructuralPartialEq for EncryptedStore<S, K>

Auto Trait Implementations§

§

impl<S, K> Freeze for EncryptedStore<S, K>
where S: Freeze, K: Freeze,

§

impl<S, K> RefUnwindSafe for EncryptedStore<S, K>

§

impl<S, K> Send for EncryptedStore<S, K>
where S: Send, K: Send,

§

impl<S, K> Sync for EncryptedStore<S, K>
where S: Sync, K: Sync,

§

impl<S, K> Unpin for EncryptedStore<S, K>
where S: Unpin, K: Unpin,

§

impl<S, K> UnsafeUnpin for EncryptedStore<S, K>
where S: UnsafeUnpin, K: UnsafeUnpin,

§

impl<S, K> UnwindSafe for EncryptedStore<S, K>
where S: UnwindSafe, K: 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> AsAny for T

Source§

fn any_ref(&self) -> &(dyn Any + 'static)
where T: 'static,

Get a shared RTTI reference.
Source§

fn any_mut(&mut self) -> &mut (dyn Any + 'static)
where T: 'static,

Get an exclusive RTTI reference.
Source§

fn any_box(self: Box<T>) -> Box<dyn Any>
where T: 'static,

Get an RTTI Box.
Source§

fn any_arc(self: Arc<T>) -> Arc<dyn Any>
where T: 'static,

Get an RTTI Arc.
Source§

fn any_arc_sync(self: Arc<T>) -> Arc<dyn Any + Send + Sync>
where T: 'static + Send + Sync,

Get an RTTI Arc which is also Send.
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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T, U> EquivalentFor<U> for T
where U: Equivalent<T>,

Source§

impl<T, Extra> ExtraFor<T> for Extra
where T: for<'a> Parse<Input<'a, Extra>>, Extra: Clone,

Source§

fn parse(&self, data: &[u8], resolve: &Arc<dyn Resolve>) -> Result<T, Error>

Source§

fn parse_checked( &self, hash: Hash, data: &[u8], resolve: &Arc<dyn Resolve>, ) -> Result<T, Error>
where T: FullHash,

Self::parse, then check that FullHash::full_hash matches.
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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.