pub struct Store<'a, T, R> { /* private fields */ }
Expand description
Storage for collaborative objects of a specific type T
in a single repository.
Implementations§
Source§impl<'a, T, R> Store<'a, T, R>where
R: ReadRepository + Store,
impl<'a, T, R> Store<'a, T, R>where
R: ReadRepository + Store,
Source§impl<T, R> Store<'_, T, R>
impl<T, R> Store<'_, T, R>
pub fn transaction( &self, actions: Vec<<T as Cob>::Action>, embeds: Vec<Embed<Uri>>, ) -> Transaction<T, R>
Source§impl<T, R> Store<'_, T, R>where
R: ReadRepository + SignRepository + Store<Namespace = PublicKey>,
T: Cob + Evaluate<R>,
<T as Cob>::Action: Serialize,
impl<T, R> Store<'_, T, R>where
R: ReadRepository + SignRepository + Store<Namespace = PublicKey>,
T: Cob + Evaluate<R>,
<T as Cob>::Action: Serialize,
Sourcepub fn update<G>(
&self,
type_name: &TypeName,
object_id: ObjectId,
message: &str,
actions: impl Into<NonEmpty<<T as Cob>::Action>>,
embeds: Vec<Embed<Uri>>,
signer: &Device<G>,
) -> Result<Updated<T>, Error>
pub fn update<G>( &self, type_name: &TypeName, object_id: ObjectId, message: &str, actions: impl Into<NonEmpty<<T as Cob>::Action>>, embeds: Vec<Embed<Uri>>, signer: &Device<G>, ) -> Result<Updated<T>, Error>
Update an object.
Trait Implementations§
Auto Trait Implementations§
impl<'a, T, R> Freeze for Store<'a, T, R>
impl<'a, T, R> RefUnwindSafe for Store<'a, T, R>where
R: RefUnwindSafe,
T: RefUnwindSafe,
impl<'a, T, R> Send for Store<'a, T, R>
impl<'a, T, R> Sync for Store<'a, T, R>
impl<'a, T, R> Unpin for Store<'a, T, R>where
T: Unpin,
impl<'a, T, R> UnwindSafe for Store<'a, T, R>where
R: RefUnwindSafe,
T: 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
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>
Converts
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>
Converts
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