[−][src]Struct sparse_merkle_tree::h256::H256
Represent 256 bits
Implementations
impl H256
[src]
pub const fn zero() -> Self
[src]
pub fn is_zero(&self) -> bool
[src]
pub fn get_bit(&self, i: u8) -> bool
[src]
pub fn set_bit(&mut self, i: u8)
[src]
pub fn clear_bit(&mut self, i: u8)
[src]
pub fn as_slice(&self) -> &[u8]
[src]
pub fn fork_height(&self, key: &H256) -> u8
[src]
Treat H256 as a path in a tree fork height is the number of common bits(from heigher to lower: 255..=0) of two H256
pub fn parent_path(&self, height: u8) -> Self
[src]
Treat H256 as a path in a tree return parent_path of self
pub fn copy_bits(&self, range: impl RangeBounds<u8>) -> Self
[src]
Copy bits and return a new H256
Trait Implementations
impl Clone for H256
[src]
impl Copy for H256
[src]
impl Debug for H256
[src]
impl Default for H256
[src]
impl Eq for H256
[src]
impl From<[u8; 32]> for H256
[src]
impl Hash for H256
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl Into<[u8; 32]> for H256
[src]
impl Ord for H256
[src]
fn cmp(&self, other: &Self) -> Ordering
[src]
#[must_use]fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn clamp(self, min: Self, max: Self) -> Self
[src]
impl PartialEq<H256> for H256
[src]
impl PartialOrd<H256> for H256
[src]
fn partial_cmp(&self, other: &Self) -> Option<Ordering>
[src]
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
impl StructuralEq for H256
[src]
impl StructuralPartialEq for H256
[src]
impl Value for H256
[src]
Auto Trait Implementations
impl RefUnwindSafe for H256
impl Send for H256
impl Sync for H256
impl Unpin for H256
impl UnwindSafe for H256
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,
fn borrow_mut(&mut self) -> &mut T
[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.
fn to_owned(&self) -> T
[src]
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.
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>,