[−][src]Struct biscuit::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 CompactJson for Empty
[src]
impl Copy for Empty
[src]
impl PartialEq<Empty> for Empty
[src]
fn eq(&self, other: &Empty) -> bool
[src]
#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn ne(&self, other: &Rhs) -> boolThis method tests for !=
.
impl Default for Empty
[src]
impl Clone for Empty
[src]
fn clone(&self) -> Empty
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Eq for Empty
[src]
impl Debug for Empty
[src]
impl Serialize for Empty
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl<'de> Deserialize<'de> for Empty
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
Auto Trait Implementations
Blanket Implementations
impl<T> CompactPart for T where
T: CompactJson,
[src]
T: CompactJson,
fn to_bytes(&Self) -> Result<Vec<u8>, Error>
[src]
JSON serialize the part and return the JSON string bytes
fn from_bytes(&[u8]) -> Result<T, Error>
[src]
fn from_base64<B: AsRef<[u8]>>(encoded: &B) -> Result<Self, Error> where
Self: Sized,
[src]
Self: Sized,
Base64 decode into Self
fn to_base64(&self) -> Result<Base64Url, Error>
[src]
Serialize Self
to some form and then base64URL Encode
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,
impl<Q, K> Equivalent for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
[src]
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,