Skip to main content

Prehash

Struct Prehash 

Source
pub struct Prehash<'i, 'o, P, I> { /* private fields */ }
Expand description

A finalized prehash with independent short identity/output borrows.

Only common processing constructs this view from a completed state bound to the same resolved identity/provider. Byte width alone never establishes that provenance. There is no public arbitrary digest-plus-OID constructor.

Implementations§

Source§

impl<'i, 'o, P, I> Prehash<'i, 'o, P, I>

Source

pub fn from_provider(&self, provider: &P) -> bool

Whether the supplied instance actually completed this finalized input.

Source

pub fn identity(&self) -> &'i I

Full selected-provider algorithm identity, including parameters/defaults.

Source

pub fn as_bytes(&self) -> &'o [u8] ⓘ

Original finalized output bytes; accessing them performs no new hashing.

Trait Implementations§

Source§

impl<'i, 'o, P: Debug, I: Debug> Debug for Prehash<'i, 'o, P, I>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'i, 'o, P, I> Freeze for Prehash<'i, 'o, P, I>

§

impl<'i, 'o, P, I> RefUnwindSafe for Prehash<'i, 'o, P, I>

§

impl<'i, 'o, P, I> Send for Prehash<'i, 'o, P, I>
where &'i P: Send, &'i I: Send,

§

impl<'i, 'o, P, I> Sync for Prehash<'i, 'o, P, I>
where &'i P: Sync, &'i I: Sync,

§

impl<'i, 'o, P, I> Unpin for Prehash<'i, 'o, P, I>

§

impl<'i, 'o, P, I> UnsafeUnpin for Prehash<'i, 'o, P, I>

§

impl<'i, 'o, P, I> UnwindSafe for Prehash<'i, 'o, P, I>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.