pub struct Store { /* private fields */ }Expand description
The claims of one repository.
Implementations§
Source§impl Store
impl Store
Sourcepub fn open(state: &Path, cwd: &Path) -> Option<Self>
pub fn open(state: &Path, cwd: &Path) -> Option<Self>
The claims of the repository containing cwd, kept under state
(<state dir>/claims). None outside a git work tree.
Sourcepub fn all(&self, now: i64) -> Vec<(Claim, Standing)>
pub fn all(&self, now: i64) -> Vec<(Claim, Standing)>
Every stored claim, with whether it still holds.
Sourcepub fn prune(&self, now: i64) -> Vec<(Claim, Standing)>
pub fn prune(&self, now: i64) -> Vec<(Claim, Standing)>
Removes the claims that no longer hold, and returns them.
Sourcepub fn claim(
&self,
holder: &Holder,
patterns: &[String],
expires: i64,
note: Option<&str>,
now: i64,
) -> Result<Vec<Claim>, Refused>
pub fn claim( &self, holder: &Holder, patterns: &[String], expires: i64, note: Option<&str>, now: i64, ) -> Result<Vec<Claim>, Refused>
Claims patterns for holder until expires (Unix seconds), or
claims nothing and returns the live claims of other sessions that
overlap them. Claiming a pattern again renews it.
Auto Trait Implementations§
impl Forget for Store
impl Freeze for Store
impl Move 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