pub struct SdJwtKB { /* private fields */ }Expand description
A struct representing an SD-JWT+KB.
An SD-JWT+KB is composed of the following:
- an SD-JWT (i.e., an Issuer-signed JWT and zero or more Disclosures), and
- Key Binding JWT.
Instance of an SD-JWT+KB can be parsed from a &str containing an SD-JWT+KB
in the Compact Serialization format.
Trait Implementations§
Source§impl Display for SdJwtKB
impl Display for SdJwtKB
Source§fn fmt(&self, f: &mut Formatter<'_>) -> Result
fn fmt(&self, f: &mut Formatter<'_>) -> Result
Serialize the SD-JWT+KB in the JWS Compact serialization format.
As specified in the draft v13, the compact format is composed of the
Issuer-signed JWT, a ~ (tilde character), zero or more Disclosures
each followed by a ~, and lastly a Key Binding JWT (KB-JWT).
§Examples
An SD-JWT+KB without Disclosures:
<Issuer-signed JWT>~<KB-JWT>.
An SD-JWT+KB with Disclosures:
<Issuer-signed JWT>~<Disclosure 1>~<Disclosure N>~<KB-JWT>.
Source§impl FromStr for SdJwtKB
impl FromStr for SdJwtKB
Source§fn from_str(value: &str) -> Result<Self, Self::Err>
fn from_str(value: &str) -> Result<Self, Self::Err>
Create a new instance of an SdJwtKB, from the provided string in the
JWS Compact Serialization format.
As specified in the draft v13, the compact format is composed of
the Issuer-signed JWT, a ~ (tilde character), zero or more
Disclosures each followed by a ~, and lastly a Key Binding JWT (KB-JWT).
§Note
No checks are carried out on any of the provided parts, e.g. there is
not a check on the jwt signature.
§Examples
An SD-JWT+KB without Disclosures:
<Issuer-signed JWT>~<KB-JWT>.
An SD-JWT+KB with Disclosures:
<Issuer-signed JWT>~<Disclosure 1>~<Disclosure N>~<KB-JWT>.
Source§type Err = Error<FormatError>
type Err = Error<FormatError>
Auto Trait Implementations§
impl Freeze for SdJwtKB
impl RefUnwindSafe for SdJwtKB
impl Send for SdJwtKB
impl Sync for SdJwtKB
impl Unpin for SdJwtKB
impl UnsafeUnpin for SdJwtKB
impl UnwindSafe for SdJwtKB
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> 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> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.