Struct rlite::Rlite
[−]
[src]
pub struct Rlite { /* fields omitted */ }
A database connection
Methods
impl Rlite
[src]
fn memory() -> Self
Create a new database in memory
fn file(path: &Path) -> Result<Self, ()>
Opens or creates a database in path
.
fn write_command(&self, command: &[&[u8]]) -> Result<(), ()>
Executes the command. It returns either success or error, with no detail.
If it succeeded, use read_reply
to get the response (if any).
fn read_reply(&self) -> Result<Reply, String>
Reads the response of the first unread command. Each command response is appended to a queue. This command pops from that queue.