pub struct InMemoryCatalog { /* private fields */ }Expand description
A simple in-memory catalog useful for tests and bootstrap wiring.
Implementations§
Source§impl InMemoryCatalog
impl InMemoryCatalog
pub fn new() -> Self
pub fn with_node_source( self, label: impl Into<String>, source: Arc<dyn TableSource>, ) -> Self
pub fn with_relationship_source( self, rel_type: impl Into<String>, source: Arc<dyn TableSource>, ) -> Self
Trait Implementations§
Source§impl Default for InMemoryCatalog
impl Default for InMemoryCatalog
Source§impl GraphSourceCatalog for InMemoryCatalog
impl GraphSourceCatalog for InMemoryCatalog
Source§fn node_source(&self, label: &str) -> Option<Arc<dyn TableSource>>
fn node_source(&self, label: &str) -> Option<Arc<dyn TableSource>>
Get node source with case-insensitive label lookup
Note: Keys are stored as lowercase, so this is an O(1) operation.
Source§fn relationship_source(&self, rel_type: &str) -> Option<Arc<dyn TableSource>>
fn relationship_source(&self, rel_type: &str) -> Option<Arc<dyn TableSource>>
Get relationship source with case-insensitive type lookup
Note: Keys are stored as lowercase, so this is an O(1) operation.
Auto Trait Implementations§
impl Freeze for InMemoryCatalog
impl !RefUnwindSafe for InMemoryCatalog
impl Send for InMemoryCatalog
impl Sync for InMemoryCatalog
impl Unpin for InMemoryCatalog
impl !UnwindSafe for InMemoryCatalog
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<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