#[non_exhaustive]pub struct UrlTokenStatement { /* private fields */ }Expand description
A verified mkit-url-token:v1 statement (§9.4).
Implementations§
Source§impl UrlTokenStatement
impl UrlTokenStatement
Sourcepub fn repository(&self) -> &str
pub fn repository(&self) -> &str
The full repository identity.
Sourcepub fn encode(&self) -> Result<Vec<u8>, UrlTokenError>
pub fn encode(&self) -> Result<Vec<u8>, UrlTokenError>
Encode the canonical statement. Validates every rule
UrlTokenStatement::parse enforces.
§Errors
The UrlTokenError of the first failed rule.
Sourcepub fn parse(bytes: &[u8]) -> Result<Self, UrlTokenError>
pub fn parse(bytes: &[u8]) -> Result<Self, UrlTokenError>
Parse a canonical statement: the §3.1 text rules, then each §9.4 field rule.
§Errors
The UrlTokenError of the first failed rule.
Trait Implementations§
Source§impl Clone for UrlTokenStatement
impl Clone for UrlTokenStatement
Source§impl Debug for UrlTokenStatement
impl Debug for UrlTokenStatement
impl Eq for UrlTokenStatement
Source§impl PartialEq for UrlTokenStatement
impl PartialEq for UrlTokenStatement
impl StructuralPartialEq for UrlTokenStatement
Auto Trait Implementations§
impl Freeze for UrlTokenStatement
impl RefUnwindSafe for UrlTokenStatement
impl Send for UrlTokenStatement
impl Sync for UrlTokenStatement
impl Unpin for UrlTokenStatement
impl UnsafeUnpin for UrlTokenStatement
impl UnwindSafe for UrlTokenStatement
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