pub struct Issued { /* private fields */ }Expand description
A grant issued to one of the peer’s tokens, which the session enforces. Dropping it ends the grant: an AUTH token’s leaves the scope, and a request’s token ends the request.
Implementations§
Source§impl Issued
impl Issued
Sourcepub fn update(&self, grant: Grant)
pub fn update(&self, grant: Grant)
Replace the grant, such as with a lowered expiry. A request’s token whose new grant no longer covers the request ends it.
Sourcepub fn revoke(self, code: SessionError, reason: impl Into<String>)
pub fn revoke(self, code: SessionError, reason: impl Into<String>)
Revoke the grant with a session error code and a reason for the peer.
Sourcepub fn closed(&self) -> impl Future<Output = Error> + Send + 'static
pub fn closed(&self) -> impl Future<Output = Error> + Send + 'static
Wait for the peer to withdraw the token (Error::Cancel), the request it rode on
to end (Error::Cancel), or its stream or the session to end.
The future holds the issue, not the grant, so dropping the grant still ends it.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Issued
impl RefUnwindSafe for Issued
impl Send for Issued
impl Sync for Issued
impl Unpin for Issued
impl UnsafeUnpin for Issued
impl UnwindSafe for Issued
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