Struct jaws::token::formats::FlatUnprotected
source · pub struct FlatUnprotected<U> { /* private fields */ }
Expand description
A token format that serializes the token as a single JSON object, with the unprotected header as a top-level field.
Implementations§
source§impl<U> FlatUnprotected<U>
impl<U> FlatUnprotected<U>
sourcepub fn new(unprotected: U) -> Self
pub fn new(unprotected: U) -> Self
Creates a new Flat
token format with the given unprotected header.
sourcepub fn unprotected(&self) -> &U
pub fn unprotected(&self) -> &U
Returns a reference to the unprotected header.
sourcepub fn unprotected_mut(&mut self) -> &mut U
pub fn unprotected_mut(&mut self) -> &mut U
Returns a mutable reference to the unprotected header.
Trait Implementations§
source§impl<U: Clone> Clone for FlatUnprotected<U>
impl<U: Clone> Clone for FlatUnprotected<U>
source§fn clone(&self) -> FlatUnprotected<U>
fn clone(&self) -> FlatUnprotected<U>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<U: Debug> Debug for FlatUnprotected<U>
impl<U: Debug> Debug for FlatUnprotected<U>
source§impl<'de, U> Deserialize<'de> for FlatUnprotected<U>where
U: Deserialize<'de>,
impl<'de, U> Deserialize<'de> for FlatUnprotected<U>where U: Deserialize<'de>,
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
source§impl<U> From<FlatUnprotected<U>> for Compact
impl<U> From<FlatUnprotected<U>> for Compact
source§fn from(_: FlatUnprotected<U>) -> Self
fn from(_: FlatUnprotected<U>) -> Self
Converts to this type from the input type.
source§impl<U> From<FlatUnprotected<U>> for Flat
impl<U> From<FlatUnprotected<U>> for Flat
source§fn from(_: FlatUnprotected<U>) -> Self
fn from(_: FlatUnprotected<U>) -> Self
Converts to this type from the input type.
source§impl<U: PartialEq> PartialEq for FlatUnprotected<U>
impl<U: PartialEq> PartialEq for FlatUnprotected<U>
source§fn eq(&self, other: &FlatUnprotected<U>) -> bool
fn eq(&self, other: &FlatUnprotected<U>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<U> Serialize for FlatUnprotected<U>where
U: Serialize,
impl<U> Serialize for FlatUnprotected<U>where U: Serialize,
source§impl<U> TokenFormat for FlatUnprotected<U>where
U: Serialize + DeserializeOwned,
impl<U> TokenFormat for FlatUnprotected<U>where U: Serialize + DeserializeOwned,
source§fn render<S>(
&self,
writer: &mut impl Write,
token: &Token<impl Serialize, S, Self>
) -> Result<(), TokenFormattingError>where
Self: Sized,
S: HasSignature,
<S as MaybeSigned>::Header: Serialize,
<S as MaybeSigned>::HeaderState: HeaderState,
fn render<S>( &self, writer: &mut impl Write, token: &Token<impl Serialize, S, Self> ) -> Result<(), TokenFormattingError>where Self: Sized, S: HasSignature, <S as MaybeSigned>::Header: Serialize, <S as MaybeSigned>::HeaderState: HeaderState,
Render the token to the given writer.
source§fn parse<P, H>(
data: Bytes
) -> Result<Token<P, Unverified<H>, Self>, TokenParseError>where
P: DeserializeOwned,
H: DeserializeOwned,
Self: Sized,
fn parse<P, H>( data: Bytes ) -> Result<Token<P, Unverified<H>, Self>, TokenParseError>where P: DeserializeOwned, H: DeserializeOwned, Self: Sized,
Parse the token from a slice.
impl<U: Eq> Eq for FlatUnprotected<U>
impl<U> StructuralEq for FlatUnprotected<U>
impl<U> StructuralPartialEq for FlatUnprotected<U>
Auto Trait Implementations§
impl<U> RefUnwindSafe for FlatUnprotected<U>where U: RefUnwindSafe,
impl<U> Send for FlatUnprotected<U>where U: Send,
impl<U> Sync for FlatUnprotected<U>where U: Sync,
impl<U> Unpin for FlatUnprotected<U>where U: Unpin,
impl<U> UnwindSafe for FlatUnprotected<U>where U: UnwindSafe,
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