pub struct ReplicatorKeyspaceHandle<S>where
S: Storage,{ /* private fields */ }Expand description
A convenience wrapper which creates a new handle with a preset keyspace.
Implementations§
Source§impl<S> ReplicatorKeyspaceHandle<S>where
S: Storage,
impl<S> ReplicatorKeyspaceHandle<S>where
S: Storage,
Sourcepub async fn get(&self, doc_id: Key) -> Result<Option<Document>, S::Error>
pub async fn get(&self, doc_id: Key) -> Result<Option<Document>, S::Error>
Retrieves a document from the underlying storage.
Sourcepub async fn get_many<I, T>(&self, doc_ids: I) -> Result<S::DocsIter, S::Error>
pub async fn get_many<I, T>(&self, doc_ids: I) -> Result<S::DocsIter, S::Error>
Retrieves a set of documents from the underlying storage.
If a document does not exist with the given ID, it is simply not part of the returned iterator.
Sourcepub async fn put(
&self,
doc_id: Key,
data: Vec<u8>,
consistency: Consistency,
) -> Result<(), StoreError<S::Error>>
pub async fn put( &self, doc_id: Key, data: Vec<u8>, consistency: Consistency, ) -> Result<(), StoreError<S::Error>>
Insert or update a single document into the datastore.
Sourcepub async fn put_many<I, T>(
&self,
documents: I,
consistency: Consistency,
) -> Result<(), StoreError<S::Error>>
pub async fn put_many<I, T>( &self, documents: I, consistency: Consistency, ) -> Result<(), StoreError<S::Error>>
Insert or update multiple documents into the datastore at once.
Sourcepub async fn del(
&self,
doc_id: Key,
consistency: Consistency,
) -> Result<(), StoreError<S::Error>>
pub async fn del( &self, doc_id: Key, consistency: Consistency, ) -> Result<(), StoreError<S::Error>>
Delete a document from the datastore with a given doc ID.
Sourcepub async fn del_many<I, T>(
&self,
doc_ids: I,
consistency: Consistency,
) -> Result<(), StoreError<S::Error>>
pub async fn del_many<I, T>( &self, doc_ids: I, consistency: Consistency, ) -> Result<(), StoreError<S::Error>>
Delete multiple documents from the datastore from the set of doc IDs.
Trait Implementations§
Auto Trait Implementations§
impl<S> Freeze for ReplicatorKeyspaceHandle<S>
impl<S> !RefUnwindSafe for ReplicatorKeyspaceHandle<S>
impl<S> Send for ReplicatorKeyspaceHandle<S>
impl<S> Sync for ReplicatorKeyspaceHandle<S>
impl<S> Unpin for ReplicatorKeyspaceHandle<S>
impl<S> !UnwindSafe for ReplicatorKeyspaceHandle<S>
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Gets the layout of the type.