Struct starknet_api::core::ClassHash
source · pub struct ClassHash(pub StarkHash);
Expand description
The hash of a ContractClass.
Tuple Fields§
§0: StarkHash
Methods from Deref<Target = StarkHash>§
pub const ZERO: Self = _
pub const ONE: Self = _
pub const TWO: Self = _
pub const THREE: Self = _
sourcepub fn serialize(&self, res: &mut impl Write) -> Result<(), Error>
pub fn serialize(&self, res: &mut impl Write) -> Result<(), Error>
Storage efficient serialization for field elements.
pub fn bytes(&self) -> &[u8] ⓘ
Trait Implementations§
source§impl<'de> Deserialize<'de> for ClassHash
impl<'de> Deserialize<'de> for ClassHash
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 Ord for ClassHash
impl Ord for ClassHash
source§impl PartialEq for ClassHash
impl PartialEq for ClassHash
source§impl PartialOrd for ClassHash
impl PartialOrd for ClassHash
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 moreimpl Copy for ClassHash
impl Eq for ClassHash
impl StructuralPartialEq for ClassHash
Auto Trait Implementations§
impl RefUnwindSafe for ClassHash
impl Send for ClassHash
impl Sync for ClassHash
impl Unpin for ClassHash
impl UnwindSafe for ClassHash
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> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.