pub struct Store { /* private fields */ }Implementations§
Source§impl Store
impl Store
Sourcepub fn load(root: &Path) -> Result<Self>
pub fn load(root: &Path) -> Result<Self>
Read the store under root; an absent store is an empty one.
The store is repository content, so a branch under review chooses what
sits at this path. Neither the directory nor the file may be a symbolic
link, or reading would open any file on the reviewer’s machine. A parse
failure reports the toml message alone, excerpted: the error’s
Display renders the offending source line, and the message can quote
a key holding control characters.
pub fn contains(&self, fingerprint: &str) -> bool
pub fn insert(&mut self, fingerprint: String) -> bool
pub fn save(&self, root: &Path) -> Result<()>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Store
impl<'de> Deserialize<'de> for Store
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Store
impl RefUnwindSafe for Store
impl Send for Store
impl Sync for Store
impl Unpin for Store
impl UnsafeUnpin for Store
impl UnwindSafe for Store
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