#[non_exhaustive]pub enum Commitment {
Body(Hash),
Pack {
id: Hash,
len: u64,
},
Part {
ticket: Hash,
index: u32,
subtree: Hash,
len: u64,
},
}Expand description
The content commitment an auth v2 signature covers.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Body(Hash)
body:<64 hex>: digest of a unary request body.
Pack
pack:<64 hex>:<decimal length>: a streamed pack upload.
Part
part:<ticket>:<index>:<subtree>:<len>.
Implementations§
Source§impl Commitment
impl Commitment
Sourcepub fn parse(text: &str) -> Result<Self, ServerError>
pub fn parse(text: &str) -> Result<Self, ServerError>
Parse the canonical text form. Uppercase hex, leading zeros and unknown prefixes are rejected, as auth v2 itself rejects them.
§Errors
crate::Code::InvalidArgument for any other input.
Trait Implementations§
Source§impl Clone for Commitment
impl Clone for Commitment
impl Copy for Commitment
Source§impl Debug for Commitment
impl Debug for Commitment
impl Eq for Commitment
Source§impl PartialEq for Commitment
impl PartialEq for Commitment
impl StructuralPartialEq for Commitment
Auto Trait Implementations§
impl Freeze for Commitment
impl RefUnwindSafe for Commitment
impl Send for Commitment
impl Sync for Commitment
impl Unpin for Commitment
impl UnsafeUnpin for Commitment
impl UnwindSafe for Commitment
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