pub struct Claims {
pub root: String,
pub publish: Vec<String>,
pub cluster: bool,
pub subscribe: Vec<String>,
pub expires: Option<SystemTime>,
pub issued: Option<SystemTime>,
}
Fields§
§root: String
The root for the publish/subscribe options below. It’s mostly for compression and is optional, defaulting to the empty string.
publish: Vec<String>
If specified, the user can publish any matching broadcasts. If not specified, the user will not publish any broadcasts.
cluster: bool
If true, then this client is considered a cluster node. Both the client and server will only announce broadcasts from non-cluster clients. This avoids convoluted routing, as only the primary origin will announce.
subscribe: Vec<String>
If specified, the user can subscribe to any matching broadcasts. If not specified, the user will not receive announcements and cannot subscribe to any broadcasts.
expires: Option<SystemTime>
The expiration time of the token as a unix timestamp.
issued: Option<SystemTime>
The issued time of the token as a unix timestamp.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Claims
impl<'de> Deserialize<'de> for Claims
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Claims
impl RefUnwindSafe for Claims
impl Send for Claims
impl Sync for Claims
impl Unpin for Claims
impl UnwindSafe for Claims
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