pub struct ReadOnlyStorage<S: Storage<I>, I: Item> { /* private fields */ }
Expand description
Trait Implementations§
source§impl<S: Storage<I>, I: Item> Storage<I> for ReadOnlyStorage<S, I>
impl<S: Storage<I>, I: Item> Storage<I> for ReadOnlyStorage<S, I>
source§fn check<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn check<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Checks that the storage works. This includes validating credentials, and reachability. Read more
source§fn discover_collections<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Discovery, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn discover_collections<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Discovery, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Finds existing collections for this storage.
source§fn create_collection<'life0, 'life1, 'async_trait>(
&'life0 self,
_href: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Collection, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn create_collection<'life0, 'life1, 'async_trait>(
&'life0 self,
_href: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Collection, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Creates a new collection with a specified
href
.source§fn destroy_collection<'life0, 'life1, 'async_trait>(
&'life0 self,
_href: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn destroy_collection<'life0, 'life1, 'async_trait>(
&'life0 self,
_href: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Deletes an existing collection. Read more
source§fn list_items<'life0, 'life1, 'async_trait>(
&'life0 self,
collection_href: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<ItemRef>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn list_items<'life0, 'life1, 'async_trait>(
&'life0 self,
collection_href: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<ItemRef>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Enumerates items in a given collection.
source§fn get_item<'life0, 'life1, 'async_trait>(
&'life0 self,
href: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(I, Etag), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_item<'life0, 'life1, 'async_trait>(
&'life0 self,
href: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(I, Etag), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Fetches a single item from given collection. Read more
source§fn get_many_items<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
hrefs: &'life1 [&'life2 str],
) -> Pin<Box<dyn Future<Output = Result<Vec<FetchedItem<I>>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn get_many_items<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
hrefs: &'life1 [&'life2 str],
) -> Pin<Box<dyn Future<Output = Result<Vec<FetchedItem<I>>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Fetches multiple items. Read more
source§fn get_all_items<'life0, 'life1, 'async_trait>(
&'life0 self,
collection_href: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<FetchedItem<I>>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_all_items<'life0, 'life1, 'async_trait>(
&'life0 self,
collection_href: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<FetchedItem<I>>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Fetch all items from a given collection. Read more
source§fn add_item<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_: &'life1 str,
_: &'life2 I,
) -> Pin<Box<dyn Future<Output = Result<ItemRef, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn add_item<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_: &'life1 str,
_: &'life2 I,
) -> Pin<Box<dyn Future<Output = Result<ItemRef, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Saves a new item into a given collection
source§fn update_item<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
_: &'life1 str,
_: &'life2 Etag,
_: &'life3 I,
) -> Pin<Box<dyn Future<Output = Result<Etag, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn update_item<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
_: &'life1 str,
_: &'life2 Etag,
_: &'life3 I,
) -> Pin<Box<dyn Future<Output = Result<Etag, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Updates the contents of an existing item.
source§fn set_property<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_: &'life1 str,
__arg2: I::Property,
_: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn set_property<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_: &'life1 str,
__arg2: I::Property,
_: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Sets the value of a property for a given collection.
source§fn unset_property<'life0, 'life1, 'async_trait>(
&'life0 self,
_: &'life1 str,
__arg2: I::Property,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn unset_property<'life0, 'life1, 'async_trait>(
&'life0 self,
_: &'life1 str,
__arg2: I::Property,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Unsets a property for a given collection.
source§fn get_property<'life0, 'life1, 'async_trait>(
&'life0 self,
href: &'life1 str,
meta: I::Property,
) -> Pin<Box<dyn Future<Output = Result<Option<String>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_property<'life0, 'life1, 'async_trait>(
&'life0 self,
href: &'life1 str,
meta: I::Property,
) -> Pin<Box<dyn Future<Output = Result<Option<String>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Returns the value of a property for a given collection.
source§fn delete_item<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_: &'life1 str,
_: &'life2 Etag,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn delete_item<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_: &'life1 str,
_: &'life2 Etag,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Deletes an existing item.
source§fn href_for_collection_id(&self, _id: &CollectionId) -> Result<Href, Error>
fn href_for_collection_id(&self, _id: &CollectionId) -> Result<Href, Error>
source§fn list_properties<'life0, 'life1, 'async_trait>(
&'life0 self,
collection_href: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<ListedProperty<I::Property>>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn list_properties<'life0, 'life1, 'async_trait>(
&'life0 self,
collection_href: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<ListedProperty<I::Property>>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
List all properties of a collection.
Auto Trait Implementations§
impl<S, I> Freeze for ReadOnlyStorage<S, I>where
S: Freeze,
impl<S, I> RefUnwindSafe for ReadOnlyStorage<S, I>where
S: RefUnwindSafe,
I: RefUnwindSafe,
impl<S, I> Send for ReadOnlyStorage<S, I>
impl<S, I> Sync for ReadOnlyStorage<S, I>
impl<S, I> Unpin for ReadOnlyStorage<S, I>
impl<S, I> UnwindSafe for ReadOnlyStorage<S, I>where
S: UnwindSafe,
I: 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> 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<Source, Target> OctetsInto<Target> for Sourcewhere
Target: OctetsFrom<Source>,
impl<Source, Target> OctetsInto<Target> for Sourcewhere
Target: OctetsFrom<Source>,
type Error = <Target as OctetsFrom<Source>>::Error
source§fn try_octets_into(
self,
) -> Result<Target, <Source as OctetsInto<Target>>::Error>
fn try_octets_into( self, ) -> Result<Target, <Source as OctetsInto<Target>>::Error>
Performs the conversion.
source§fn octets_into(self) -> Target
fn octets_into(self) -> Target
Performs an infallible conversion.