pub struct GraphStoreConfig {
pub backend: GraphBackend,
pub namespaces: Vec<String>,
pub default_namespace: String,
pub default_layer: Option<u8>,
}Expand description
Configuration for graph store creation.
Fields§
§backend: GraphBackendWhich backend to use.
namespaces: Vec<String>Namespace partitions (for InMemory and KnowledgeGraph).
default_namespace: StringDefault namespace (for Simple and KnowledgeGraph).
default_layer: Option<u8>Default layer (for Simple and KnowledgeGraph). None = 0.
Implementations§
Source§impl GraphStoreConfig
impl GraphStoreConfig
Sourcepub fn new(backend: GraphBackend) -> Self
pub fn new(backend: GraphBackend) -> Self
Create config for a specific backend with default namespace.
Sourcepub fn with_namespaces(self, namespaces: &[&str]) -> Self
pub fn with_namespaces(self, namespaces: &[&str]) -> Self
Set the namespace partitions.
Sourcepub fn with_default_namespace(self, ns: &str) -> Self
pub fn with_default_namespace(self, ns: &str) -> Self
Set the default namespace.
Sourcepub fn with_layer(self, layer: Option<u8>) -> Self
pub fn with_layer(self, layer: Option<u8>) -> Self
Set the default layer.
Trait Implementations§
Source§impl Clone for GraphStoreConfig
impl Clone for GraphStoreConfig
Source§fn clone(&self) -> GraphStoreConfig
fn clone(&self) -> GraphStoreConfig
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 Debug for GraphStoreConfig
impl Debug for GraphStoreConfig
Auto Trait Implementations§
impl Freeze for GraphStoreConfig
impl RefUnwindSafe for GraphStoreConfig
impl Send for GraphStoreConfig
impl Sync for GraphStoreConfig
impl Unpin for GraphStoreConfig
impl UnsafeUnpin for GraphStoreConfig
impl UnwindSafe for GraphStoreConfig
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