Struct mas_oidc_client::jose::jwk::JsonWebKey
source · pub struct JsonWebKey<P> { /* private fields */ }
Implementations§
source§impl<P> JsonWebKey<P>
impl<P> JsonWebKey<P>
sourcepub const fn new(parameters: P) -> JsonWebKey<P>
pub const fn new(parameters: P) -> JsonWebKey<P>
Create a new JsonWebKey
with the given parameters.
sourcepub fn try_map<M, O, E>(self, mapper: M) -> Result<JsonWebKey<O>, E>
pub fn try_map<M, O, E>(self, mapper: M) -> Result<JsonWebKey<O>, E>
Map the parameters of this JsonWebKey
to a new type, with a fallible
mapper, consuming the original key.
§Errors
Returns an error if the mapper returns an error.
sourcepub fn map<M, O>(self, mapper: M) -> JsonWebKey<O>where
M: FnOnce(P) -> O,
pub fn map<M, O>(self, mapper: M) -> JsonWebKey<O>where
M: FnOnce(P) -> O,
Map the parameters of this JsonWebKey
to a new type, consuming the
original key.
sourcepub fn try_cloned_map<M, O, E>(&self, mapper: M) -> Result<JsonWebKey<O>, E>
pub fn try_cloned_map<M, O, E>(&self, mapper: M) -> Result<JsonWebKey<O>, E>
Map the parameters of this JsonWebKey
to a new type, with a fallible
mapper, cloning the other fields.
§Errors
Returns an error if the mapper returns an error.
sourcepub fn cloned_map<M, O>(&self, mapper: M) -> JsonWebKey<O>
pub fn cloned_map<M, O>(&self, mapper: M) -> JsonWebKey<O>
Map the parameters of this JsonWebKey
to a new type, cloning the
other fields.
sourcepub fn with_use(self, value: JsonWebKeyUse) -> JsonWebKey<P>
pub fn with_use(self, value: JsonWebKeyUse) -> JsonWebKey<P>
Set the use
field of this JsonWebKey
.
sourcepub fn with_key_ops(self, key_ops: Vec<JsonWebKeyOperation>) -> JsonWebKey<P>
pub fn with_key_ops(self, key_ops: Vec<JsonWebKeyOperation>) -> JsonWebKey<P>
Set the key_ops
field of this JsonWebKey
.
sourcepub fn with_alg(self, alg: JsonWebSignatureAlg) -> JsonWebKey<P>
pub fn with_alg(self, alg: JsonWebSignatureAlg) -> JsonWebKey<P>
Set the alg
field of this JsonWebKey
.
sourcepub fn with_kid(self, kid: impl Into<String>) -> JsonWebKey<P>
pub fn with_kid(self, kid: impl Into<String>) -> JsonWebKey<P>
Set the kid
field of this JsonWebKey
.
sourcepub const fn alg(&self) -> Option<&JsonWebSignatureAlg>
pub const fn alg(&self) -> Option<&JsonWebSignatureAlg>
Get the kid
field of this JsonWebKey
, if set.
sourcepub const fn params(&self) -> &P
pub const fn params(&self) -> &P
Get the inner parameters of this JsonWebKey
.
Trait Implementations§
source§impl<P> Clone for JsonWebKey<P>where
P: Clone,
impl<P> Clone for JsonWebKey<P>where
P: Clone,
source§fn clone(&self) -> JsonWebKey<P>
fn clone(&self) -> JsonWebKey<P>
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl<P> Constrainable for JsonWebKey<P>where
P: ParametersInfo,
impl<P> Constrainable for JsonWebKey<P>where
P: ParametersInfo,
source§fn kty(&self) -> JsonWebKeyType
fn kty(&self) -> JsonWebKeyType
kty
) of this keysource§fn algs(&self) -> &[JsonWebSignatureAlg]
fn algs(&self) -> &[JsonWebSignatureAlg]
fn alg(&self) -> Option<&JsonWebSignatureAlg>
source§fn use_(&self) -> Option<&JsonWebKeyUse>
fn use_(&self) -> Option<&JsonWebKeyUse>
source§impl<P> Debug for JsonWebKey<P>where
P: Debug,
impl<P> Debug for JsonWebKey<P>where
P: Debug,
source§impl<'de, P> Deserialize<'de> for JsonWebKey<P>where
P: Deserialize<'de>,
impl<'de, P> Deserialize<'de> for JsonWebKey<P>where
P: Deserialize<'de>,
source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<JsonWebKey<P>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<JsonWebKey<P>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
source§impl<P> FromIterator<JsonWebKey<P>> for JsonWebKeySet<P>
impl<P> FromIterator<JsonWebKey<P>> for JsonWebKeySet<P>
source§fn from_iter<T>(iter: T) -> JsonWebKeySet<P>where
T: IntoIterator<Item = JsonWebKey<P>>,
fn from_iter<T>(iter: T) -> JsonWebKeySet<P>where
T: IntoIterator<Item = JsonWebKey<P>>,
source§impl<P> JsonSchema for JsonWebKey<P>where
P: JsonSchema,
impl<P> JsonSchema for JsonWebKey<P>where
P: JsonSchema,
source§fn schema_name() -> String
fn schema_name() -> String
source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
source§fn json_schema(gen: &mut SchemaGenerator) -> Schema
fn json_schema(gen: &mut SchemaGenerator) -> Schema
source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
$ref
keyword. Read moresource§impl<P> PartialEq for JsonWebKey<P>where
P: PartialEq,
impl<P> PartialEq for JsonWebKey<P>where
P: PartialEq,
source§fn eq(&self, other: &JsonWebKey<P>) -> bool
fn eq(&self, other: &JsonWebKey<P>) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl<P> Serialize for JsonWebKey<P>where
P: Serialize,
impl<P> Serialize for JsonWebKey<P>where
P: Serialize,
source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
source§impl TryFrom<JsonWebKey<JsonWebKeyPrivateParameters>> for JsonWebKey<JsonWebKeyPublicParameters>
impl TryFrom<JsonWebKey<JsonWebKeyPrivateParameters>> for JsonWebKey<JsonWebKeyPublicParameters>
source§fn try_from(
value: JsonWebKey<JsonWebKeyPrivateParameters>,
) -> Result<JsonWebKey<JsonWebKeyPublicParameters>, <JsonWebKey<JsonWebKeyPublicParameters> as TryFrom<JsonWebKey<JsonWebKeyPrivateParameters>>>::Error>
fn try_from( value: JsonWebKey<JsonWebKeyPrivateParameters>, ) -> Result<JsonWebKey<JsonWebKeyPublicParameters>, <JsonWebKey<JsonWebKeyPublicParameters> as TryFrom<JsonWebKey<JsonWebKeyPrivateParameters>>>::Error>
impl<P> Eq for JsonWebKey<P>where
P: Eq,
impl<P> StructuralPartialEq for JsonWebKey<P>
Auto Trait Implementations§
impl<P> Freeze for JsonWebKey<P>where
P: Freeze,
impl<P> RefUnwindSafe for JsonWebKey<P>where
P: RefUnwindSafe,
impl<P> Send for JsonWebKey<P>where
P: Send,
impl<P> Sync for JsonWebKey<P>where
P: Sync,
impl<P> Unpin for JsonWebKey<P>where
P: Unpin,
impl<P> UnwindSafe for JsonWebKey<P>where
P: 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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.source§impl<T> FutureExt for T
impl<T> FutureExt for T
source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more