pub struct Memory { /* private fields */ }Expand description
A change store in memory, i.e. basically a hash table.
Implementations§
Trait Implementations§
Source§impl ChangeStore for Memory
impl ChangeStore for Memory
type Error = Error
fn has_contents(&self, hash: Hash, _: Option<ChangeId>) -> bool
fn get_contents<F: Fn(ChangeId) -> Option<Hash>>( &self, hash: F, key: Vertex<ChangeId>, buf: &mut [u8], ) -> Result<usize, Self::Error>
fn get_contents_ext( &self, key: Vertex<Option<Hash>>, buf: &mut [u8], ) -> Result<usize, Self::Error>
fn change_deletes_position<F: Fn(ChangeId) -> Option<Hash>>( &self, hash: F, change: ChangeId, pos: Position<Option<Hash>>, ) -> Result<Vec<Hash>, Self::Error>
fn save_change<E: From<Self::Error> + From<ChangeError>, F: FnOnce(&mut Change, &Hash) -> Result<(), E>>( &self, p: &mut Change, f: F, ) -> Result<Hash, E>
fn del_change(&self, h: &Hash) -> Result<bool, Self::Error>
fn get_change(&self, h: &Hash) -> Result<Change, Self::Error>
fn get_header(&self, h: &Hash) -> Result<ChangeHeader, Self::Error>
fn get_dependencies(&self, hash: &Hash) -> Result<Vec<Hash>, Self::Error>
fn get_extra_known(&self, hash: &Hash) -> Result<Vec<Hash>, Self::Error>
fn get_changes( &self, hash: &Hash, ) -> Result<Vec<Hunk<Option<Hash>, Local>>, Self::Error>
fn knows(&self, hash0: &Hash, hash1: &Hash) -> Result<bool, Self::Error>
fn has_edge( &self, change: Hash, from: Position<Option<Hash>>, to: Position<Option<Hash>>, flags: EdgeFlags, ) -> Result<bool, Self::Error>
fn get_file_meta<'a, F: Fn(ChangeId) -> Option<Hash>>( &self, hash: F, vertex: Vertex<ChangeId>, buf: &'a mut [u8], ) -> Result<FileMetadata<'a>, Self::Error>
Auto Trait Implementations§
impl Freeze for Memory
impl RefUnwindSafe for Memory
impl Send for Memory
impl Sync for Memory
impl Unpin for Memory
impl UnsafeUnpin for Memory
impl UnwindSafe for Memory
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