pub struct Rlite { /* private fields */ }
Expand description
A database connection
Implementations§
Source§impl Rlite
impl Rlite
Sourcepub fn write_command(&self, command: &[&[u8]]) -> Result<(), ()>
pub 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).
Sourcepub fn read_reply(&self) -> Result<Reply, String>
pub 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.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Rlite
impl RefUnwindSafe for Rlite
impl !Send for Rlite
impl !Sync for Rlite
impl Unpin for Rlite
impl UnwindSafe for Rlite
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more