pub struct MemoryRefStore { /* private fields */ }Expand description
Fully in-memory ref database with transactional updates.
Built only on the public super::backend helpers, so it doubles as a reference for
custom backends.
Implementations§
Trait Implementations§
Source§impl Debug for MemoryRefStore
impl Debug for MemoryRefStore
Source§impl Default for MemoryRefStore
impl Default for MemoryRefStore
Source§impl RefStore for MemoryRefStore
impl RefStore for MemoryRefStore
Source§fn format(&self) -> RefStorageFormat
fn format(&self) -> RefStorageFormat
Which on-disk or logical format this store uses. Read more
Source§fn read_raw(&self, name: &str) -> Result<Option<RawRef>>
fn read_raw(&self, name: &str) -> Result<Option<RawRef>>
Read the stored value for
name without resolving symbolic targets. Read moreSource§fn for_each_ref(
&self,
prefix: &str,
f: &mut dyn FnMut(&RefEntry) -> ControlFlow<()>,
) -> Result<()>
fn for_each_ref( &self, prefix: &str, f: &mut dyn FnMut(&RefEntry) -> ControlFlow<()>, ) -> Result<()>
Source§fn prepare(
&self,
txn: RefTransaction,
) -> Result<Box<dyn PreparedRefTransaction + Send + '_>, RefStoreError>
fn prepare( &self, txn: RefTransaction, ) -> Result<Box<dyn PreparedRefTransaction + Send + '_>, RefStoreError>
Validate
txn, take locks, and return a committable batch. Read moreSource§fn for_each_reflog_entry(
&self,
name: &str,
reverse: bool,
f: &mut dyn FnMut(&ReflogEntry) -> ControlFlow<()>,
) -> Result<()>
fn for_each_reflog_entry( &self, name: &str, reverse: bool, f: &mut dyn FnMut(&ReflogEntry) -> ControlFlow<()>, ) -> Result<()>
Source§fn create_reflog(&self, name: &str) -> Result<()>
fn create_reflog(&self, name: &str) -> Result<()>
Create an empty reflog file/record for
name.Source§fn replace_reflog(&self, name: &str, entries: Vec<ReflogEntry>) -> Result<()>
fn replace_reflog(&self, name: &str, entries: Vec<ReflogEntry>) -> Result<()>
Replace the entire reflog (used by expire/delete-entries).
Source§fn for_each_reflog_ref(
&self,
f: &mut dyn FnMut(&str) -> ControlFlow<()>,
) -> Result<()>
fn for_each_reflog_ref( &self, f: &mut dyn FnMut(&str) -> ControlFlow<()>, ) -> Result<()>
Invoke
f for each ref name that has a reflog, in sorted order. Read moreAuto Trait Implementations§
impl !Freeze for MemoryRefStore
impl RefUnwindSafe for MemoryRefStore
impl Send for MemoryRefStore
impl Sync for MemoryRefStore
impl Unpin for MemoryRefStore
impl UnsafeUnpin for MemoryRefStore
impl UnwindSafe for MemoryRefStore
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