Struct Verified

Source
pub struct Verified<H, Alg, Sig = SignatureBytes>
where Alg: DynJsonWebAlgorithm + ?Sized,
{ /* private fields */ }
Expand description

This JWS has been verified.

This state is used when this program has verified the signature, so we know that the signature is valid and consistent with the header values. However, we also know that we did not create the token, and modifying it may result in headers which are not consistent with the signature.

Trait Implementations§

Source§

impl<H: Clone, Alg, Sig: Clone> Clone for Verified<H, Alg, Sig>

Source§

fn clone(&self) -> Verified<H, Alg, Sig>

Returns a duplicate of the value. Read more
1.0.0 · Source§

const fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<H: Debug, Alg, Sig: Debug> Debug for Verified<H, Alg, Sig>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<H, Alg, Sig> HasSignature for Verified<H, Alg, Sig>

Source§

type Signature = Sig

The type of the signature, which should be representable as a byte slice.
Source§

fn signature(&self) -> &Self::Signature

Get a reference to the signature.
Source§

impl<H, Alg, Sig> MaybeSigned for Verified<H, Alg, Sig>
where Alg: DynJsonWebAlgorithm + ?Sized,

Source§

type HeaderState = SignedHeader

The state of the header with respect to its signature. Read more
Source§

type Header = H

The custom header type. Read more
Source§

fn is_signed(&self) -> bool

Returns true if the token is signed.
Source§

fn is_verified(&self) -> bool

Returns true if the token is signed and verified.
Source§

impl<H: PartialEq, Alg, Sig: PartialEq> PartialEq for Verified<H, Alg, Sig>

Source§

fn eq(&self, other: &Verified<H, Alg, Sig>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<H, Alg, Sig> Serialize for Verified<H, Alg, Sig>
where Alg: DynJsonWebAlgorithm + ?Sized, H: Serialize, Sig: Serialize,

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl<H: Eq, Alg, Sig: Eq> Eq for Verified<H, Alg, Sig>
where Alg: DynJsonWebAlgorithm + ?Sized + Eq,

Source§

impl<H, Alg, Sig> StructuralPartialEq for Verified<H, Alg, Sig>
where Alg: DynJsonWebAlgorithm + ?Sized,

Auto Trait Implementations§

§

impl<H, Alg, Sig> Freeze for Verified<H, Alg, Sig>
where Sig: Freeze, H: Freeze, Alg: ?Sized,

§

impl<H, Alg, Sig> RefUnwindSafe for Verified<H, Alg, Sig>

§

impl<H, Alg, Sig> Send for Verified<H, Alg, Sig>
where Sig: Send, H: Send, Alg: Send + ?Sized,

§

impl<H, Alg, Sig> Sync for Verified<H, Alg, Sig>
where Sig: Sync, H: Sync, Alg: Sync + ?Sized,

§

impl<H, Alg, Sig> Unpin for Verified<H, Alg, Sig>
where Sig: Unpin, H: Unpin, Alg: Unpin + ?Sized,

§

impl<H, Alg, Sig> UnwindSafe for Verified<H, Alg, Sig>
where Sig: UnwindSafe, H: UnwindSafe, Alg: UnwindSafe + ?Sized,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> ErasedDestructor for T
where T: 'static,