Struct holo_hash::HoloHashed [−][src]
Represents some piece of content along with its hash representation, so that hashes need not be calculated multiple times. Provides an easy constructor which consumes the content.
Implementations
impl<C> HoloHashed<C> where
C: HashableContent,
[src]
C: HashableContent,
pub fn with_pre_hashed(content: C, hash: HoloHashOf<C>) -> Self
[src]
Combine content with its precalculated hash
pub fn as_content(&self) -> &C
[src]
Accessor for content
pub fn into_content(self) -> C
[src]
Convert to content
pub fn into_inner(self) -> (C, HoloHashOf<C>)
[src]
Deconstruct as a tuple
Trait Implementations
impl<C> AsRef<C> for HoloHashed<C> where
C: HashableContent,
[src]
C: HashableContent,
impl<C> Borrow<C> for HoloHashed<C> where
C: HashableContent,
[src]
C: HashableContent,
impl<C> Clone for HoloHashed<C> where
C: HashableContent + Clone,
[src]
C: HashableContent + Clone,
fn clone(&self) -> Self
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<C> Debug for HoloHashed<C> where
C: HashableContent + Debug,
[src]
C: HashableContent + Debug,
impl<C> Deref for HoloHashed<C> where
C: HashableContent,
[src]
C: HashableContent,
impl<'de, C: HashableContent> Deserialize<'de> for HoloHashed<C> where
C: Deserialize<'de>,
[src]
C: Deserialize<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl<C> Eq for HoloHashed<C> where
C: HashableContent,
[src]
C: HashableContent,
impl<C: HashableContent> HasHash<<C as HashableContent>::HashType> for HoloHashed<C>
[src]
fn as_hash(&self) -> &HoloHashOf<C>
[src]
fn into_hash(self) -> HoloHashOf<C>
[src]
impl<C> Hash for HoloHashed<C> where
C: HashableContent,
[src]
C: HashableContent,
fn hash<StdH: Hasher>(&self, state: &mut StdH)
[src]
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl<C> PartialEq<HoloHashed<C>> for HoloHashed<C> where
C: HashableContent,
[src]
C: HashableContent,
impl<C: HashableContent> Serialize for HoloHashed<C> where
C: Serialize,
[src]
C: Serialize,
Auto Trait Implementations
impl<C> RefUnwindSafe for HoloHashed<C> where
C: RefUnwindSafe,
<C as HashableContent>::HashType: RefUnwindSafe,
C: RefUnwindSafe,
<C as HashableContent>::HashType: RefUnwindSafe,
impl<C> Send for HoloHashed<C> where
C: Send,
<C as HashableContent>::HashType: Send,
C: Send,
<C as HashableContent>::HashType: Send,
impl<C> Sync for HoloHashed<C> where
C: Sync,
<C as HashableContent>::HashType: Sync,
C: Sync,
<C as HashableContent>::HashType: Sync,
impl<C> Unpin for HoloHashed<C> where
C: Unpin,
<C as HashableContent>::HashType: Unpin,
C: Unpin,
<C as HashableContent>::HashType: Unpin,
impl<C> UnwindSafe for HoloHashed<C> where
C: UnwindSafe,
<C as HashableContent>::HashType: UnwindSafe,
C: UnwindSafe,
<C as HashableContent>::HashType: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
[src]
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
pub fn equivalent(&self, key: &K) -> bool
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,