Trait rincon_core::api::connector::Connector
[−]
[src]
pub trait Connector { type Connection: 'static + Execute; fn connection(&self, database_name: &str) -> Self::Connection; fn system_connection(&self) -> Self::Connection; fn use_auth_token(&mut self, token: Jwt); fn invalidate_auth_token(&mut self); }
A connector establishes and provides connections to a server.
Associated Types
type Connection: 'static + Execute
The type of connections this connector provides.
Required Methods
fn connection(&self, database_name: &str) -> Self::Connection
Establishes a connection to the database with the given name and returns the connection.
More sophisticated implementations may also maintain a pool of connections and return available connections from that pool.
fn system_connection(&self) -> Self::Connection
Establishes a connection to the system database as defined by ArangoDB and returns the connection.
fn use_auth_token(&mut self, token: Jwt)
Tells this connector to use the given token for authentication.
fn invalidate_auth_token(&mut self)
Tells this connector to no longer use the configured token for authentication.