pub struct Integrity { /* private fields */ }Expand description
An integrity, sha512-9c1fQe…. In JSON it is that string.
Implementations§
Source§impl Integrity
impl Integrity
Sourcepub fn new(text: &str) -> Result<Self, Invalid>
pub fn new(text: &str) -> Result<Self, Invalid>
The integrity text, when it is one: sha256-, sha384- or sha512- and a digest. The digest is the hash in
base64, but is taken as written, any visible characters: it is compared, never decoded, and the spec’s own
examples shorten it (sha512-9c1fQe…).
§Errors
Invalid::Integrity when it isn’t one.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Integrity
impl<'de> Deserialize<'de> for Integrity
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Integrity
Source§impl Ord for Integrity
impl Ord for Integrity
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialOrd for Integrity
impl PartialOrd for Integrity
impl StructuralPartialEq for Integrity
Auto Trait Implementations§
impl Forget for Integrity
impl Freeze for Integrity
impl Move for Integrity
impl RefUnwindSafe for Integrity
impl Send for Integrity
impl Sync for Integrity
impl Unpin for Integrity
impl UnsafeUnpin for Integrity
impl UnwindSafe for Integrity
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