Struct biscuit::Empty
[−]
[src]
pub struct Empty {}
An empty struct that derives Serialize and Deserialize. Can be used, for example, in places where a type
for custom values (such as private claims in a ClaimsSet
) is required but you have nothing to implement.
Examples
extern crate biscuit; use std::str::FromStr; use biscuit::*; use biscuit::jws::*; use biscuit::jwa::*; let claims_set = ClaimsSet::<biscuit::Empty> { registered: RegisteredClaims { issuer: Some(FromStr::from_str("https://www.acme.com").unwrap()), subject: Some(FromStr::from_str("John Doe").unwrap()), audience: Some(SingleOrMultiple::Single(FromStr::from_str("htts://acme-customer.com").unwrap())), not_before: Some(1234.into()), ..Default::default() }, private: Default::default(), }; let expected_jwt = JWT::new_decoded(From::from( RegisteredHeader { algorithm: SignatureAlgorithm::HS256, ..Default::default() }), claims_set);
Trait Implementations
impl Debug for Empty
[src]
impl Eq for Empty
[src]
impl PartialEq for Empty
[src]
fn eq(&self, __arg_0: &Empty) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests for !=
.
impl Clone for Empty
[src]
fn clone(&self) -> Empty
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more