pub struct Repository {
pub db: Option<Arc<Mutex<Database>>>,
}Fields§
§db: Option<Arc<Mutex<Database>>>Implementations§
Source§impl Repository
impl Repository
pub fn new() -> Self
pub fn create(&mut self, filename: &str) -> Result<&mut Self>
pub fn open(&mut self, filename: &str) -> Result<&mut Self>
pub fn load(&self, uid: &str) -> Result<Value>
pub fn mutate<F, R>(&self, f: F) -> Result<R>
pub fn savepoint(&self) -> Result<Savepoint>
pub fn restore(&self, savepoint: &Savepoint) -> Result<()>
pub fn inspect<F, R>(&self, f: F) -> Result<R>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Repository
impl RefUnwindSafe for Repository
impl Send for Repository
impl Sync for Repository
impl Unpin for Repository
impl UnwindSafe for Repository
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