BackendClient

Enum BackendClient 

Source
pub enum BackendClient {
    Sqlite(SqliteGraphBackend),
    Native(NativeGraphBackend),
    Dynamic(Box<dyn GraphBackend>),
}
Expand description

Minimal client wrapper for v0.2.5

Variants§

§

Sqlite(SqliteGraphBackend)

§

Native(NativeGraphBackend)

§

Dynamic(Box<dyn GraphBackend>)

Dynamic backend for factory-created backends (e.g., from open_graph())

Implementations§

Source§

impl BackendClient

Source

pub fn new(backend: SqliteGraphBackend) -> Self

Source

pub fn new_native(backend: NativeGraphBackend) -> Self

Source

pub fn from_dynamic(backend: Box<dyn GraphBackend>) -> Self

Create from a boxed trait object (e.g., from open_graph factory)

Source

pub fn backend(&self) -> &dyn GraphBackend

Get the GraphBackend trait object

Source

pub fn graph(&self) -> Option<&SqliteGraph>

Get the underlying SqliteGraph if this is a SQLite backend

Source

pub fn entity_ids(&self) -> Result<Option<Vec<i64>>, SqliteGraphError>

Get all entity IDs if this is a SQLite backend

Source

pub fn backend_type(&self) -> &str

Get backend type name for debugging

Source

pub fn get_wal_metrics(&self) -> Option<WALManagerMetrics>

Get WAL metrics (only available for Native backend with native-v2 feature)

Source

pub fn get_active_transaction_count(&self) -> Option<usize>

Get active transaction count (only available for Native backend with native-v2 feature)

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V