pub struct Backend { /* private fields */ }Expand description
LadybugDB graph database backend.
Implementations§
Source§impl Backend
impl Backend
Sourcepub fn open(path: &Path) -> Result<Self, GraphdError>
pub fn open(path: &Path) -> Result<Self, GraphdError>
Open or create a database at the given directory path with default config.
Sourcepub fn open_tenant(
path: &Path,
memory_mb: u64,
max_threads: u64,
) -> Result<Self, GraphdError>
pub fn open_tenant( path: &Path, memory_mb: u64, max_threads: u64, ) -> Result<Self, GraphdError>
Open or create a database with memory and thread limits.
This is the preferred constructor for multi-tenant environments.
Sourcepub fn open_with_config(
path: &Path,
config: SystemConfig,
) -> Result<Self, GraphdError>
pub fn open_with_config( path: &Path, config: SystemConfig, ) -> Result<Self, GraphdError>
Open or create a database at the given directory path with custom config.
Sourcepub fn connection(&self) -> Result<Connection<'_>, GraphdError>
pub fn connection(&self) -> Result<Connection<'_>, GraphdError>
Create a new connection to the database.
Auto Trait Implementations§
impl !Freeze for Backend
impl !RefUnwindSafe for Backend
impl Forget for Backend
impl Move for Backend
impl Send for Backend
impl Sync for Backend
impl Unpin for Backend
impl UnsafeUnpin for Backend
impl UnwindSafe for Backend
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