pub struct StorageCapabilities {
pub backend: StorageBackend,
pub durable: bool,
pub transactions: bool,
pub sync: bool,
pub clear: bool,
pub read_only: bool,
pub bulk_load: bool,
}Expand description
Capability bits for a model or backend.
Fields§
§backend: StorageBackendBackend kind.
durable: boolQuads survive process restart.
transactions: boolcrate::Model::transaction is available.
sync: boolcrate::Model::sync is meaningful (no-op success on memory).
clear: boolcrate::Model::clear / clear_graph are available.
read_only: boolStore was opened read-only.
bulk_load: boolBulk / transactional load helpers are available.
Implementations§
Source§impl StorageCapabilities
impl StorageCapabilities
Sourcepub const fn for_backend(backend: StorageBackend, read_only: bool) -> Self
pub const fn for_backend(backend: StorageBackend, read_only: bool) -> Self
Capabilities for backend in the requested access mode.
Sourcepub const fn memory() -> Self
pub const fn memory() -> Self
Capabilities for a writable in-memory model.
For read-only memory, use Self::for_backend with
StorageBackend::Memory.
Trait Implementations§
Source§impl Clone for StorageCapabilities
impl Clone for StorageCapabilities
Source§fn clone(&self) -> StorageCapabilities
fn clone(&self) -> StorageCapabilities
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for StorageCapabilities
Source§impl Debug for StorageCapabilities
impl Debug for StorageCapabilities
impl Eq for StorageCapabilities
Source§impl PartialEq for StorageCapabilities
impl PartialEq for StorageCapabilities
impl StructuralPartialEq for StorageCapabilities
Auto Trait Implementations§
impl Freeze for StorageCapabilities
impl RefUnwindSafe for StorageCapabilities
impl Send for StorageCapabilities
impl Sync for StorageCapabilities
impl Unpin for StorageCapabilities
impl UnsafeUnpin for StorageCapabilities
impl UnwindSafe for StorageCapabilities
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.