Struct linera_base::crypto::CryptoHash
source · pub struct CryptoHash(/* private fields */);Expand description
A Sha3-256 value.
Implementations§
source§impl CryptoHash
impl CryptoHash
pub fn new<T>(value: &T) -> Selfwhere T: BcsHashable + ?Sized,
pub fn as_bytes( &self ) -> &GenericArray<u8, <Sha3_256 as OutputSizeUser>::OutputSize>
Trait Implementations§
source§impl Clone for CryptoHash
impl Clone for CryptoHash
source§fn clone(&self) -> CryptoHash
fn clone(&self) -> CryptoHash
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl Debug for CryptoHash
impl Debug for CryptoHash
source§impl<'de> Deserialize<'de> for CryptoHash
impl<'de> Deserialize<'de> for CryptoHash
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
source§impl Display for CryptoHash
impl Display for CryptoHash
source§impl From<CryptoHash> for [u64; 4]
impl From<CryptoHash> for [u64; 4]
source§fn from(crypto_hash: CryptoHash) -> Self
fn from(crypto_hash: CryptoHash) -> Self
Converts to this type from the input type.
source§impl FromStr for CryptoHash
impl FromStr for CryptoHash
source§impl Hash for CryptoHash
impl Hash for CryptoHash
source§impl InputType for CryptoHash
impl InputType for CryptoHash
§type RawValueType = CryptoHash
type RawValueType = CryptoHash
The raw type used for validator. Read more
source§fn create_type_info(registry: &mut Registry) -> String
fn create_type_info(registry: &mut Registry) -> String
Create type information in the registry and return qualified typename.
source§fn parse(value: Option<Value>) -> InputValueResult<Self>
fn parse(value: Option<Value>) -> InputValueResult<Self>
Parse from
Value. None represents undefined.source§fn as_raw_value(&self) -> Option<&Self::RawValueType>
fn as_raw_value(&self) -> Option<&Self::RawValueType>
Returns a reference to the raw value.
source§fn qualified_type_name() -> String
fn qualified_type_name() -> String
Qualified typename.
source§impl Ord for CryptoHash
impl Ord for CryptoHash
source§fn cmp(&self, other: &CryptoHash) -> Ordering
fn cmp(&self, other: &CryptoHash) -> Ordering
1.21.0 · 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
source§impl OutputType for CryptoHash
impl OutputType for CryptoHash
source§fn create_type_info(registry: &mut Registry) -> String
fn create_type_info(registry: &mut Registry) -> String
Create type information in the registry and return qualified typename.
source§fn resolve<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
_: &'life1 ContextSelectionSet<'life2>,
_field: &'life3 Positioned<Field>
) -> Pin<Box<dyn Future<Output = ServerResult<Value>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn resolve<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, _: &'life1 ContextSelectionSet<'life2>, _field: &'life3 Positioned<Field> ) -> Pin<Box<dyn Future<Output = ServerResult<Value>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,
Resolve an output value to
async_graphql::Value.source§fn qualified_type_name() -> String
fn qualified_type_name() -> String
Qualified typename.
source§impl PartialEq for CryptoHash
impl PartialEq for CryptoHash
source§fn eq(&self, other: &CryptoHash) -> bool
fn eq(&self, other: &CryptoHash) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl PartialOrd for CryptoHash
impl PartialOrd for CryptoHash
source§fn partial_cmp(&self, other: &CryptoHash) -> Option<Ordering>
fn partial_cmp(&self, other: &CryptoHash) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self and other) and is used by the <=
operator. Read moresource§impl ScalarType for CryptoHash
impl ScalarType for CryptoHash
source§impl Serialize for CryptoHash
impl Serialize for CryptoHash
source§impl TryFrom<&[u8]> for CryptoHash
impl TryFrom<&[u8]> for CryptoHash
impl Copy for CryptoHash
impl Eq for CryptoHash
impl StructuralEq for CryptoHash
impl StructuralPartialEq for CryptoHash
Auto Trait Implementations§
impl RefUnwindSafe for CryptoHash
impl Send for CryptoHash
impl Sync for CryptoHash
impl Unpin for CryptoHash
impl UnwindSafe for CryptoHash
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
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.