pub struct TokenStore(/* private fields */);Expand description
The issued confirmations of one server process.
Implementations§
Source§impl TokenStore
impl TokenStore
Sourcepub fn issue(&self, plan: &EditPlan, repository: &Path) -> ConfirmToken
pub fn issue(&self, plan: &EditPlan, repository: &Path) -> ConfirmToken
Issues a confirmation for a previewed plan.
Sourcepub fn consume(
&self,
presented: Option<&str>,
plan: &EditPlan,
repository: &Path,
) -> Option<Value>
pub fn consume( &self, presented: Option<&str>, plan: &EditPlan, repository: &Path, ) -> Option<Value>
Consumes a confirmation, or returns the refusal that says why it could not be.
Consuming happens whether or not the checks pass: a token that was presented is spent, so a caller cannot probe with the same value twice.
Trait Implementations§
Source§impl Default for TokenStore
impl Default for TokenStore
Source§fn default() -> TokenStore
fn default() -> TokenStore
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !Freeze for TokenStore
impl RefUnwindSafe for TokenStore
impl Send for TokenStore
impl Sync for TokenStore
impl Unpin for TokenStore
impl UnsafeUnpin for TokenStore
impl UnwindSafe for TokenStore
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