Struct cattlerustler::Rustler
[−]
[src]
pub struct Rustler { /* fields omitted */ }
Methods
impl Rustler
[src]
fn open(path: &str) -> Rustler
[src]
Connect to the database at path
. Create a file if path
doesn't exist.
fn has(&self, tid: i32) -> bool
[src]
Check if a task with the given id exists in the database.
fn get(&self, tid: i32) -> Result<Task, RustlerError>
[src]
Returns a task with the given id. Error if none found.
fn delete(&self, tid: i32) -> Result<(), RustlerError>
[src]
Deletes a task with the given id. Deleting a task deletes all its children.
fn update(&self, t: &mut Task) -> Result<(), RustlerError>
[src]
Inserts the given task. If there exists a task with the same id, it will be overwritten.
Leave id as None
for inserting a new task. The task's id will be populated after update.
fn iter(&self) -> TaskIterator
[src]
Iterator visiting all tasks.