[][src]Struct kiln::Db

pub struct Db { /* fields omitted */ }

Methods

impl Db[src]

pub fn new(path: &str) -> Result<Self, Error>[src]

Create or connect to an existing database in the directory provided. If one exists, it will return a Db object in that directory, however it will not verify the integrity of the tables at creation. These are only verified when calling db.table(name, spec) which verifies that the spec of the table of that name matches that which is provided.

pub fn table(&self, name: &str, tablespec: TableSpec) -> Result<Table, Error>[src]

Create or access a table by name and spec. Verifies that if the table exists, it matches the spec given. This will return an Err if the table spec can not be parsed. It is important to handle this error as it will lead to errors inserting data later on in the tables usage.

Auto Trait Implementations

impl Send for Db

impl Sync for Db

Blanket Implementations

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

impl<T> From for T[src]

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

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

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

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

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

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.