pub enum EngineLinkStore<S> {
Mutable(S),
ReadOnly(S),
}Expand description
Access-mode wrapper for any LinkStore implementation.
Variants§
Implementations§
Source§impl<S> EngineLinkStore<S>
impl<S> EngineLinkStore<S>
Sourcepub const fn with_access_mode(store: S, access_mode: AccessMode) -> Self
pub const fn with_access_mode(store: S, access_mode: AccessMode) -> Self
Wraps a store according to the configured access mode.
Sourcepub const fn access_mode(&self) -> AccessMode
pub const fn access_mode(&self) -> AccessMode
Returns the configured access mode.
Sourcepub fn into_inner(self) -> S
pub fn into_inner(self) -> S
Consumes the wrapper and returns the store.
Trait Implementations§
Source§impl<S: Clone> Clone for EngineLinkStore<S>
impl<S: Clone> Clone for EngineLinkStore<S>
Source§fn clone(&self) -> EngineLinkStore<S>
fn clone(&self) -> EngineLinkStore<S>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<S: Debug> Debug for EngineLinkStore<S>
impl<S: Debug> Debug for EngineLinkStore<S>
Source§impl<S: LinkStore> LinkStore for EngineLinkStore<S>
impl<S: LinkStore> LinkStore for EngineLinkStore<S>
Source§fn create(
&mut self,
references: &[LinkId],
metadata: LinkMetadata,
) -> Result<LinkId, StorageError>
fn create( &mut self, references: &[LinkId], metadata: LinkMetadata, ) -> Result<LinkId, StorageError>
Creates a link and returns its stable id. Read more
Source§fn read(&self, id: LinkId) -> Result<Option<Link>, StorageError>
fn read(&self, id: LinkId) -> Result<Option<Link>, StorageError>
Reads a link by id. Read more
Source§fn update(
&mut self,
id: LinkId,
references: &[LinkId],
metadata: LinkMetadata,
) -> Result<bool, StorageError>
fn update( &mut self, id: LinkId, references: &[LinkId], metadata: LinkMetadata, ) -> Result<bool, StorageError>
Replaces an existing link’s references and metadata. Read more
Source§fn delete(&mut self, id: LinkId) -> Result<bool, StorageError>
fn delete(&mut self, id: LinkId) -> Result<bool, StorageError>
Deletes a link by id. Read more
Source§fn search(&self, query: &LinkStoreQuery) -> Result<Vec<Link>, StorageError>
fn search(&self, query: &LinkStoreQuery) -> Result<Vec<Link>, StorageError>
Returns links matching
query. Read moreSource§fn count(&self, query: &LinkStoreQuery) -> Result<usize, StorageError>
fn count(&self, query: &LinkStoreQuery) -> Result<usize, StorageError>
Counts links matching
query. Read moreSource§impl<S: PartialEq> PartialEq for EngineLinkStore<S>
impl<S: PartialEq> PartialEq for EngineLinkStore<S>
impl<S: Eq> Eq for EngineLinkStore<S>
impl<S> StructuralPartialEq for EngineLinkStore<S>
Auto Trait Implementations§
impl<S> Freeze for EngineLinkStore<S>where
S: Freeze,
impl<S> RefUnwindSafe for EngineLinkStore<S>where
S: RefUnwindSafe,
impl<S> Send for EngineLinkStore<S>where
S: Send,
impl<S> Sync for EngineLinkStore<S>where
S: Sync,
impl<S> Unpin for EngineLinkStore<S>where
S: Unpin,
impl<S> UnsafeUnpin for EngineLinkStore<S>where
S: UnsafeUnpin,
impl<S> UnwindSafe for EngineLinkStore<S>where
S: UnwindSafe,
Blanket Implementations§
§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
§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,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. 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§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Returns the layout of the type.