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

source

pub fn new() -> Self

Creates a new ConfigBuilder with default values.

source

pub fn uri(self, uri: impl Into<String>) -> Self

The uri of the Neo4j server, e.g. “127.0.0.1:7687”.

source

pub fn user(self, user: impl Into<String>) -> Self

The username for authenticating with the Neo4j server.

source

pub fn password(self, password: impl Into<String>) -> Self

The password for authenticating with the Neo4j server.

source

pub fn db(self, db: impl Into<Database>) -> Self

The name of the database to connect to.

Defaults to “neo4j” if not set.

source

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.

source

pub fn max_connections(self, max_connections: usize) -> Self

The maximum number of connections in the connection pool.

Defaults to 16 if not set.

source

pub fn build(self) -> Result<Config>

Trait Implementations§

source§

impl Default for ConfigBuilder

source§

fn default() -> Self

Returns the “default value” for a type. Read more

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>,

§

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>,

§

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.