[][src]Struct db::DatabaseHandler

pub struct DatabaseHandler {
    pub handle: PgConnection,
    pub clients: ClientHandler,
}

Main database handler struct

Fields

handle: PgConnection

acutal connection to postgres database

clients: ClientHandler

handle to the clients table

Methods

impl DatabaseHandler[src]

pub fn connect() -> Self[src]

creates a new instance of the handler and defaults to postgres url: postgres://muoxi:muoxi@localhost/muoxi When setting up postgresql create user name muoxi and password muoxi and/or replace the internal url variable in this function with an appropriate and valid url. It will panic if it can't connect to a database.

Auto Trait Implementations

impl !RefUnwindSafe for DatabaseHandler

impl Send for DatabaseHandler

impl !Sync for DatabaseHandler

impl Unpin for DatabaseHandler

impl UnwindSafe for DatabaseHandler

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> IntoSql for T

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,