#[non_exhaustive]pub enum RefreshEvent {
Refreshed {
caps: Vec<String>,
expires_at: Option<SystemTime>,
},
AuthLost {
reason: AuthLostReason,
},
}Expand description
Events the refresh task emits to the adopter’s SSE route.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Refreshed
Broker re-validated the bearer. caps is the latest authorised
capability set — may be the same as before, or smaller (shrunk
by a partial revoke). The adopter updates its per-stream cap
reference for future requests but does not cancel in-flight
tool dispatches.
AuthLost
Bearer is no longer valid (expired, revoked, or
broker-recognised-bad). Adopter route should emit its
application-level auth_lost frame and close the stream. The
refresh task exits after sending this; the channel closes.
Fields
§
reason: AuthLostReasonTrait Implementations§
Source§impl Clone for RefreshEvent
impl Clone for RefreshEvent
Auto Trait Implementations§
impl Freeze for RefreshEvent
impl RefUnwindSafe for RefreshEvent
impl Send for RefreshEvent
impl Sync for RefreshEvent
impl Unpin for RefreshEvent
impl UnsafeUnpin for RefreshEvent
impl UnwindSafe for RefreshEvent
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