pub struct BrokerToken {
pub access_token: String,
pub expires: u64,
pub ttl_ms: Option<u64>,
}Expand description
An access token as returned by the broker’s GET /token.
Deliberately has no refresh-token field: a Remote client must never receive or hold one. This is the invariant made structural — there is no place to put a refresh token even if the broker mistakenly sent one.
Fields§
§access_token: String§expires: u64Absolute expiry, unix-epoch milliseconds (matches
OAuthCredentials.expires). When ttl_ms is present the client
overwrites this with its own clock + ttl to defeat clock skew.
ttl_ms: Option<u64>Optional relative TTL in ms. When the broker sends it, the client
recomputes expires = client_now + ttl_ms, eliminating broker↔client
clock skew on suspend/resume VMs (board C3). Absent → use expires.
Trait Implementations§
Source§impl Clone for BrokerToken
impl Clone for BrokerToken
Source§fn clone(&self) -> BrokerToken
fn clone(&self) -> BrokerToken
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for BrokerToken
impl Debug for BrokerToken
Source§impl<'de> Deserialize<'de> for BrokerToken
impl<'de> Deserialize<'de> for BrokerToken
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<BrokerToken, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<BrokerToken, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for BrokerToken
impl RefUnwindSafe for BrokerToken
impl Send for BrokerToken
impl Sync for BrokerToken
impl Unpin for BrokerToken
impl UnsafeUnpin for BrokerToken
impl UnwindSafe for BrokerToken
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.