Struct mas_oidc_client::jose::jwk::JsonWebKey
pub struct JsonWebKey<P> { /* private fields */ }
Implementations§
§impl<P> JsonWebKey<P>
impl<P> JsonWebKey<P>
pub const fn new(parameters: P) -> JsonWebKey<P>
pub const fn new(parameters: P) -> JsonWebKey<P>
Create a new JsonWebKey
with the given parameters.
pub 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.
pub 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.
pub 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.
pub 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.
pub fn with_use(self, value: JsonWebKeyUse) -> JsonWebKey<P>
pub fn with_use(self, value: JsonWebKeyUse) -> JsonWebKey<P>
Set the use
field of this JsonWebKey
.
pub 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
.
pub fn with_alg(self, alg: JsonWebSignatureAlg) -> JsonWebKey<P>
pub fn with_alg(self, alg: JsonWebSignatureAlg) -> JsonWebKey<P>
Set the alg
field of this JsonWebKey
.
pub 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
.
pub const fn alg(&self) -> Option<&JsonWebSignatureAlg>
pub const fn alg(&self) -> Option<&JsonWebSignatureAlg>
Get the kid
field of this JsonWebKey
, if set.
pub const fn params(&self) -> &P
pub const fn params(&self) -> &P
Get the inner parameters of this JsonWebKey
.
Trait Implementations§
§impl<P> Clone for JsonWebKey<P>where
P: Clone,
impl<P> Clone for JsonWebKey<P>where
P: Clone,
§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 more§impl<P> Constrainable for JsonWebKey<P>where
P: ParametersInfo,
impl<P> Constrainable for JsonWebKey<P>where
P: ParametersInfo,
§fn kty(&self) -> JsonWebKeyType
fn kty(&self) -> JsonWebKeyType
kty
) of this key§fn algs(&self) -> &[JsonWebSignatureAlg]
fn algs(&self) -> &[JsonWebSignatureAlg]
fn alg(&self) -> Option<&JsonWebSignatureAlg>
§fn use_(&self) -> Option<&JsonWebKeyUse>
fn use_(&self) -> Option<&JsonWebKeyUse>
§impl<P> Debug for JsonWebKey<P>where
P: Debug,
impl<P> Debug for JsonWebKey<P>where
P: Debug,
§impl<'de, P> Deserialize<'de> for JsonWebKey<P>where
P: Deserialize<'de>,
impl<'de, P> Deserialize<'de> for JsonWebKey<P>where
P: Deserialize<'de>,
§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>,
§impl<P> FromIterator<JsonWebKey<P>> for JsonWebKeySet<P>
impl<P> FromIterator<JsonWebKey<P>> for JsonWebKeySet<P>
§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>>,
§impl<P> JsonSchema for JsonWebKey<P>where
P: JsonSchema,
impl<P> JsonSchema for JsonWebKey<P>where
P: JsonSchema,
§fn schema_name() -> String
fn schema_name() -> String
§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
§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 more§impl<P> PartialEq for JsonWebKey<P>where
P: PartialEq,
impl<P> PartialEq for JsonWebKey<P>where
P: PartialEq,
§impl<P> Serialize for JsonWebKey<P>where
P: Serialize,
impl<P> Serialize for JsonWebKey<P>where
P: Serialize,
§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,
§impl TryFrom<JsonWebKey<JsonWebKeyPrivateParameters>> for JsonWebKey<JsonWebKeyPublicParameters>
impl TryFrom<JsonWebKey<JsonWebKeyPrivateParameters>> for JsonWebKey<JsonWebKeyPublicParameters>
§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§unsafe fn clone_to_uninit(&self, dst: *mut T)
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