[−][src]Struct biscuit::Compact
A collection of CompactPart
s that have been converted to Base64Url
Fields
parts: Vec<Base64Url>
Parts of the compact representation
Methods
impl Compact
[src]
pub fn new() -> Self
[src]
Create an empty struct
pub fn with_capacity(capacity: usize) -> Self
[src]
Create an empty struct with some expected capacity
pub fn push(&mut self, part: &dyn CompactPart) -> Result<(), Error>
[src]
Push a CompactPart
to the end
pub fn len(&self) -> usize
[src]
Returns the number of parts
pub fn is_empty(&self) -> bool
[src]
Returns whether there are no parts
pub fn encode(&self) -> String
[src]
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
pub fn decode(encoded: &str) -> Self
[src]
Convenience function to split an encoded compact representation into a list of Base64Url
.
pub fn part<T: CompactPart>(&self, index: usize) -> Result<T, Error>
[src]
Convenience function to retrieve a part at a certain index and decode into the type desired
Trait Implementations
impl Clone for Compact
[src]
impl Debug for Compact
[src]
impl Default for Compact
[src]
impl<'de> Deserialize<'de> for Compact
[src]
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where
D: Deserializer<'de>,
[src]
D: Deserializer<'de>,
impl Display for Compact
[src]
impl Eq for Compact
[src]
impl PartialEq<Compact> for Compact
[src]
impl Serialize for Compact
[src]
impl StructuralEq for Compact
[src]
impl StructuralPartialEq for Compact
[src]
Auto Trait Implementations
impl RefUnwindSafe for Compact
impl Send for Compact
impl Sync for Compact
impl Unpin for Compact
impl UnwindSafe for Compact
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,
impl<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
[src]
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
fn equivalent(&self, key: &K) -> bool
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,