pub struct OpenOptions { /* private fields */ }Expand description
Options and flags which can be used to configure how a Galaxy is opened.
This builder exposes the ability to configure how a Galaxy is opened and what
permissions on the opened galaxy, or more exactly, the graphs it manages.
Generally speaking, when using Options, you’ll first call OpenOptions::new, then
chain calls to methods to set each option, then call OpenOptions::open to open a galaxy.
This will give a crate::Result with a Galaxy inside that you can further operate on.
§Examples
use tugraph::{db::OpenOptions, Error};
let galaxy = OpenOptions::new()
.create(true)
.open("/tmp/rust_tugraph/doc/OpenOptions", "admin", "73@TuGraph")?;Implementations§
Source§impl OpenOptions
impl OpenOptions
Sourcepub fn new() -> Self
pub fn new() -> Self
Creates a initial new set of options with dir where the database
was created or to be created, the username and password used to open
if exists.
All other options not listed in parameters are default to false.
§Errors
TODO(eadrenking@outlook.com)
§Examples
use tugraph::{db::OpenOptions, Error};
let galaxy = OpenOptions::new()
.create(true)
.open("/tmp/rust_tugraph/doc/open_new", "admin", "73@TuGraph")?;Trait Implementations§
Source§impl Default for OpenOptions
impl Default for OpenOptions
Source§fn default() -> OpenOptions
fn default() -> OpenOptions
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for OpenOptions
impl RefUnwindSafe for OpenOptions
impl Send for OpenOptions
impl Sync for OpenOptions
impl Unpin for OpenOptions
impl UnwindSafe for OpenOptions
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