pub struct Compact {
pub parts: Vec<Base64Url>,
}Expand description
A collection of CompactParts that have been converted to Base64Url
Fields§
§parts: Vec<Base64Url>Parts of the compact representation
Implementations§
Source§impl Compact
impl Compact
Sourcepub fn with_capacity(capacity: usize) -> Compact
pub fn with_capacity(capacity: usize) -> Compact
Create an empty struct with some expected capacity
Sourcepub fn push(&mut self, part: &dyn CompactPart) -> Result<(), Error>
pub fn push(&mut self, part: &dyn CompactPart) -> Result<(), Error>
Push a CompactPart to the end
Sourcepub fn encode(&self) -> String
pub fn encode(&self) -> String
Encodes the various parts into Base64 URL encoding and then concatenates them with period ‘.’
This corresponds to the various Compact representation in JWE and JWS, for example
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Compact
impl<'de> Deserialize<'de> for Compact
Source§fn deserialize<D>(
deserializer: D,
) -> Result<Compact, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<Compact, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Compact
Source§impl Serialize for Compact
impl Serialize for Compact
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,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for Compact
Auto Trait Implementations§
impl Freeze for Compact
impl RefUnwindSafe for Compact
impl Send for Compact
impl Sync for Compact
impl Unpin for Compact
impl UnsafeUnpin for Compact
impl UnwindSafe for Compact
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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
Compare self to
key and return true if they are equal.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.
Source§impl<T> ValidateIp for Twhere
T: ToString,
impl<T> ValidateIp for Twhere
T: ToString,
Source§fn validate_ipv4(&self) -> bool
fn validate_ipv4(&self) -> bool
Validates whether the given string is an IP V4
Source§fn validate_ipv6(&self) -> bool
fn validate_ipv6(&self) -> bool
Validates whether the given string is an IP V6
Source§fn validate_ip(&self) -> bool
fn validate_ip(&self) -> bool
Validates whether the given string is an IP