Struct ostree::Checksum[][src]

pub struct Checksum { /* fields omitted */ }

A binary SHA256 checksum.

Implementations

impl Checksum[src]

pub fn from_bytes(bytes: &[u8; 32]) -> Checksum[src]

Create a Checksum from a byte array.

This copies the array.

pub fn from_hex(hex_checksum: &str) -> Result<Checksum, ChecksumError>[src]

Create a Checksum from a hexadecimal SHA256 string.

pub fn from_base64(b64_checksum: &str) -> Result<Checksum, ChecksumError>[src]

Create a Checksum from a base64-encoded String.

pub fn to_hex(&self) -> String[src]

Convert checksum to hex-encoded string.

pub fn to_base64(&self) -> String[src]

Convert checksum to base64 string.

Trait Implementations

impl Clone for Checksum[src]

impl Debug for Checksum[src]

impl Display for Checksum[src]

impl Drop for Checksum[src]

impl Eq for Checksum[src]

impl FromGlibPtrFull<*mut [*mut u8; 32]> for Checksum[src]

impl FromGlibPtrFull<*mut [u8; 32]> for Checksum[src]

impl FromGlibPtrFull<*mut u8> for Checksum[src]

impl FromGlibPtrNone<*mut [u8; 32]> for Checksum[src]

impl PartialEq<Checksum> for Checksum[src]

impl Send for Checksum[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.