pub struct BoundToken { /* private fields */ }Expand description
A token bound to the request; the epoch comparison is all that is left (§9.4).
Implementations§
Source§impl BoundToken
impl BoundToken
Sourcepub fn check_visibility_change(
&self,
changed_ms: u64,
) -> Result<(), TokenRejected>
pub fn check_visibility_change( &self, changed_ms: u64, ) -> Result<(), TokenRejected>
The visibility rule (SPEC-WRITE-GRANTS §9.4): a token issued at or
before the repository’s last visibility change (changed_ms, the
server’s clock, 0 when it never changed) no longer serves.
§Errors
TokenRejected when the token predates the change.
Sourcepub fn check_epoch(&self, stored: u64) -> Result<(), TokenRejected>
pub fn check_epoch(&self, stored: u64) -> Result<(), TokenRejected>
The last check: the token serves only while the stored epoch still equals the epoch it was minted at.
§Errors
TokenRejected on a mismatch.
Trait Implementations§
Source§impl Clone for BoundToken
impl Clone for BoundToken
impl Copy for BoundToken
Auto Trait Implementations§
impl Freeze for BoundToken
impl RefUnwindSafe for BoundToken
impl Send for BoundToken
impl Sync for BoundToken
impl Unpin for BoundToken
impl UnsafeUnpin for BoundToken
impl UnwindSafe for BoundToken
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