Struct neo4rs::ConfigBuilder
source · pub struct ConfigBuilder { /* private fields */ }
Expand description
A builder to override default configurations and build the Config
.
Implementations§
source§impl ConfigBuilder
impl ConfigBuilder
sourcepub fn uri(self, uri: impl Into<String>) -> Self
pub fn uri(self, uri: impl Into<String>) -> Self
The uri of the Neo4j server, e.g. “127.0.0.1:7687”.
sourcepub fn user(self, user: impl Into<String>) -> Self
pub fn user(self, user: impl Into<String>) -> Self
The username for authenticating with the Neo4j server.
sourcepub fn password(self, password: impl Into<String>) -> Self
pub fn password(self, password: impl Into<String>) -> Self
The password for authenticating with the Neo4j server.
sourcepub fn db(self, db: impl Into<Database>) -> Self
pub fn db(self, db: impl Into<Database>) -> Self
The name of the database to connect to.
Defaults to “neo4j” if not set.
sourcepub fn fetch_size(self, fetch_size: usize) -> Self
pub fn fetch_size(self, fetch_size: usize) -> Self
fetch_size
indicates the number of rows to fetch from server in one request.
It is recommended to use a large fetch_size
if you are working with large data sets.
Defaults to 200 if not set.
sourcepub fn max_connections(self, max_connections: usize) -> Self
pub fn max_connections(self, max_connections: usize) -> Self
The maximum number of connections in the connection pool.
Defaults to 16 if not set.
pub fn build(self) -> Result<Config>
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for ConfigBuilder
impl Send for ConfigBuilder
impl Sync for ConfigBuilder
impl Unpin for ConfigBuilder
impl UnwindSafe for ConfigBuilder
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