#[non_exhaustive]
pub enum HashInput {
Entry(Entry),
Action(Action),
Blake2B(Vec<u8, Global>, u8),
Sha256(Vec<u8, Global>),
Sha512(Vec<u8, Global>),
Keccak256(Vec<u8, Global>),
Sha3256(Vec<u8, Global>),
}
Expand description
Input to holochain hash function.
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.
Entry(Entry)
Hash an Entry.
Action(Action)
Hash an action.
Blake2B(Vec<u8, Global>, u8)
Blake2b is the native Holochain hashing algorithm and compatible with e.g. Polkadot and Zcash. Second value is the output length of the hash in bytes.
Sha256(Vec<u8, Global>)
256 bit SHA-2 a.k.a. SHA-256 used by Bitcoin, IPFS, etc.
Sha512(Vec<u8, Global>)
512 bit SHA-2 a.k.a. SHA-512.
Keccak256(Vec<u8, Global>)
Keccak256 is the variant of SHA3 used by the Ethereum Virtual Machine. It is slightly different to the NIST standard SHA3-256. (i.e. the resulting hashes are completely different)
Sha3256(Vec<u8, Global>)
NIST standard SHA3-256.
Trait Implementations§
§impl<'de> Deserialize<'de> for HashInput
impl<'de> Deserialize<'de> for HashInput
§fn deserialize<__D>(
__deserializer: __D
) -> Result<HashInput, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<HashInput, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
§impl Serialize for HashInput
impl Serialize for HashInput
§fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for HashInput
Auto Trait Implementations§
impl RefUnwindSafe for HashInput
impl Send for HashInput
impl Sync for HashInput
impl Unpin for HashInput
impl UnwindSafe for HashInput
Blanket Implementations§
§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
§impl<F, W, T, D> Deserialize<With<T, W>, D> for Fwhere
W: DeserializeWith<F, T, D>,
D: Fallible + ?Sized,
F: ?Sized,
impl<F, W, T, D> Deserialize<With<T, W>, D> for Fwhere
W: DeserializeWith<F, T, D>,
D: Fallible + ?Sized,
F: ?Sized,
§fn deserialize(
&self,
deserializer: &mut D
) -> Result<With<T, W>, <D as Fallible>::Error>
fn deserialize(
&self,
deserializer: &mut D
) -> Result<With<T, W>, <D as Fallible>::Error>
Deserializes using the given deserializer
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> Upcastable for Twhere
T: 'static + Any + Send + Sync,
impl<T> Upcastable for Twhere
T: 'static + Any + Send + Sync,
§fn upcast_any_ref(&self) -> &(dyn Any + 'static)
fn upcast_any_ref(&self) -> &(dyn Any + 'static)
upcast ref
§fn upcast_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn upcast_any_mut(&mut self) -> &mut (dyn Any + 'static)
upcast mut ref