Struct exar_server::Server [] [src]

pub struct Server { /* fields omitted */ }

Exar DB's server.

It manages TCP connections.

Examples

extern crate exar;
extern crate exar_server;

use exar::*;
use exar_server::*;

let db = Database::new(DatabaseConfig::default());
let config = ServerConfig::default();

let mut server = Server::new(config, db).unwrap();
server.listen();

Methods

impl Server
[src]

Creates a server with the given config and database and binds it to the configured host and port, or returns a DatabaseError if a failure occurs.

Creates a server database and binds it to the given address, or returns a DatabaseError if a failure occurs.

Returns a modified version of the server by setting its credentials to the given value.

Starts listening for incoming TCP connections.

It will block the current thread indefinitely.

Trait Implementations

impl Debug for Server
[src]

Formats the value using the given formatter.