Struct compact_jwt::jws::Jws
source · pub struct Jws { /* private fields */ }
Expand description
A Jws that is being created or has succeeded in being validated
Implementations§
source§impl Jws
impl Jws
sourcepub fn into_json<T: Serialize>(value: &T) -> Result<Jws, Error>
pub fn into_json<T: Serialize>(value: &T) -> Result<Jws, Error>
Create a JWS from a serialisable type. This assumes you want to encode the input value with json.
sourcepub fn from_json<'a, T: Deserialize<'a>>(&'a self) -> Result<T, Error>
pub fn from_json<'a, T: Deserialize<'a>>(&'a self) -> Result<T, Error>
Deserialise the inner payload of this JWS assuming it contains json.
Trait Implementations§
source§impl JwsSignable for Jws
impl JwsSignable for Jws
§type Signed = JwsCompact
type Signed = JwsCompact
The type that should be emitted when the signature is completed
source§fn data(&self) -> Result<JwsCompactSign2Data, JwtError>
fn data(&self) -> Result<JwsCompactSign2Data, JwtError>
Retrieve the inner data from the Jws that is to be signed.
source§fn post_process(&self, value: JwsCompact) -> Result<Self::Signed, JwtError>
fn post_process(&self, value: JwsCompact) -> Result<Self::Signed, JwtError>
After the signature is complete, allow post-processing of the compact jws
impl StructuralPartialEq for Jws
Auto Trait Implementations§
impl Freeze for Jws
impl RefUnwindSafe for Jws
impl Send for Jws
impl Sync for Jws
impl Unpin for Jws
impl UnwindSafe for Jws
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