Struct casper_types::contracts::ContractHash[][src]

pub struct ContractHash(_);

A newtype wrapping a HashAddr which is the raw bytes of the ContractHash

Implementations

impl ContractHash[src]

pub const fn new(value: HashAddr) -> ContractHash[src]

Constructs a new ContractHash from the raw bytes of the contract hash.

pub fn value(&self) -> HashAddr[src]

Returns the raw bytes of the contract hash as an array.

pub fn as_bytes(&self) -> &[u8]

Notable traits for &'_ [u8]

impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
[src]

Returns the raw bytes of the contract hash as a slice.

pub fn to_formatted_string(&self) -> String[src]

Formats the ContractHash for users getting and putting.

pub fn from_formatted_str(input: &str) -> Result<Self, FromStrError>[src]

Parses a string formatted as per Self::to_formatted_string() into a ContractHash.

Trait Implementations

impl AsRef<[u8]> for ContractHash[src]

impl CLTyped for ContractHash[src]

impl Clone for ContractHash[src]

impl Copy for ContractHash[src]

impl DataSize for ContractHash[src]

impl Debug for ContractHash[src]

impl Default for ContractHash[src]

impl<'de> Deserialize<'de> for ContractHash[src]

impl Display for ContractHash[src]

impl Eq for ContractHash[src]

impl From<[u8; 32]> for ContractHash[src]

impl From<ContractHash> for Key[src]

impl FromBytes for ContractHash[src]

impl Hash for ContractHash[src]

impl Ord for ContractHash[src]

impl PartialEq<ContractHash> for ContractHash[src]

impl PartialOrd<ContractHash> for ContractHash[src]

impl Serialize for ContractHash[src]

impl StructuralEq for ContractHash[src]

impl StructuralPartialEq for ContractHash[src]

impl ToBytes for ContractHash[src]

impl TryFrom<&'_ [u8]> for ContractHash[src]

type Error = TryFromSliceForContractHashError

The type returned in the event of a conversion error.

impl TryFrom<&'_ Vec<u8, Global>> for ContractHash[src]

type Error = TryFromSliceForContractHashError

The type returned in the event of a conversion error.

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<A, T> AsBits<T> for A where
    T: BitStore + BitMemory,
    A: AsRef<[T]>, 

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Conv for T

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> FmtForward for T

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pipe for T

impl<T> PipeAsRef for T

impl<T> PipeBorrow for T

impl<T> PipeDeref for T

impl<T> PipeRef for T

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> Tap for T

impl<T, U> TapAsRef<U> for T where
    U: ?Sized

impl<T, U> TapBorrow<U> for T where
    U: ?Sized

impl<T> TapDeref for T

impl<T> ToHex for T where
    T: AsRef<[u8]>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T> TryConv for T

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,