Struct exar_server::ServerConfig [] [src]

pub struct ServerConfig {
    pub host: String,
    pub port: u16,
    pub username: Option<String>,
    pub password: Option<String>,

Exar DB's server configuration.


extern crate exar_server;

use exar_server::*;

let config = ServerConfig {
    host: "".to_owned(),
    port: 38580,
    username: Some("username".to_owned()),
    password: Some("password".to_owned())


host: String

The server host.

port: u16

The server port.

username: Option<String>

The server authentication's username.

password: Option<String>

The server authentication's password.


impl ServerConfig

fn address(&self) -> String

Returns a string representation of the server address (host:port).

Trait Implementations

impl Decodable for ServerConfig

fn decode<__D: Decoder>(__arg_0: &mut __D) -> Result<ServerConfig, __D::Error>

impl Encodable for ServerConfig

fn encode<__S: Encoder>(&self, __arg_0: &mut __S) -> Result<(), __S::Error>

impl Eq for ServerConfig

impl PartialEq for ServerConfig

fn eq(&self, __arg_0: &ServerConfig) -> bool

This method tests for self and other values to be equal, and is used by ==. Read more

fn ne(&self, __arg_0: &ServerConfig) -> bool

This method tests for !=.

impl Debug for ServerConfig

fn fmt(&self, __arg_0: &mut Formatter) -> Result

Formats the value using the given formatter.

impl Clone for ServerConfig

fn clone(&self) -> ServerConfig

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more

impl Default for ServerConfig

fn default() -> ServerConfig

Returns the "default value" for a type. Read more