Struct medallion::claims::Claims
[−]
[src]
pub struct Claims<T: Serialize + Deserialize> { pub reg: Registered, pub private: T, }
A default claim set, including the standard, or registered, claims and the ability to specify your own as private claims.
Fields
reg: Registered
private: T
Methods
impl<T: Serialize + Deserialize> Claims<T>
[src]
fn new(reg: Registered, private: T) -> Claims<T>
Convenience factory method
Trait Implementations
impl<T: Debug + Serialize + Deserialize> Debug for Claims<T>
[src]
impl<T: Default + Serialize + Deserialize> Default for Claims<T>
[src]
impl<T: PartialEq + Serialize + Deserialize> PartialEq for Claims<T>
[src]
fn eq(&self, __arg_0: &Claims<T>) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Claims<T>) -> bool
This method tests for !=
.
impl<T: Serialize + Deserialize> Component for Claims<T>
[src]
fn from_base64(raw: &str) -> Result<Claims<T>, Error>
This implementation simply parses the base64 data twice, each time applying it to the registered and private claims.
fn to_base64(&self) -> Result<String, Error>
Renders both the registered and private claims into a single consolidated JSON representation before encoding.