Struct casper_types::contracts::ContractPackageHash [−][src]
A newtype wrapping a HashAddr
which is the raw bytes of
the ContractPackageHash
Implementations
impl ContractPackageHash
[src]
pub const fn new(value: HashAddr) -> ContractPackageHash
[src]
Constructs a new ContractPackageHash
from the raw bytes of the contract package hash.
pub fn value(&self) -> HashAddr
[src]
Returns the raw bytes of the contract hash as an array.
pub fn as_bytes(&self) -> &[u8]ⓘ
[src]
Returns the raw bytes of the contract hash as a slice
.
pub fn to_formatted_string(&self) -> String
[src]
Formats the ContractPackageHash
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
ContractPackageHash
.
Trait Implementations
impl AsRef<[u8]> for ContractPackageHash
[src]
impl CLTyped for ContractPackageHash
[src]
impl Clone for ContractPackageHash
[src]
fn clone(&self) -> ContractPackageHash
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for ContractPackageHash
[src]
impl DataSize for ContractPackageHash
[src]
const IS_DYNAMIC: bool
[src]
const STATIC_HEAP_SIZE: usize
[src]
fn estimate_heap_size(&self) -> usize
[src]
impl Debug for ContractPackageHash
[src]
impl Default for ContractPackageHash
[src]
fn default() -> ContractPackageHash
[src]
impl<'de> Deserialize<'de> for ContractPackageHash
[src]
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
[src]
impl Display for ContractPackageHash
[src]
impl Eq for ContractPackageHash
[src]
impl From<[u8; 32]> for ContractPackageHash
[src]
impl From<ContractPackageHash> for Key
[src]
fn from(package_hash: ContractPackageHash) -> Key
[src]
impl FromBytes for ContractPackageHash
[src]
fn from_bytes(bytes: &[u8]) -> Result<(Self, &[u8]), Error>
[src]
fn from_vec(bytes: Vec<u8>) -> Result<(Self, Vec<u8>), Error>
[src]
impl Hash for ContractPackageHash
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl Ord for ContractPackageHash
[src]
fn cmp(&self, other: &ContractPackageHash) -> Ordering
[src]
#[must_use]pub fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn clamp(self, min: Self, max: Self) -> Self
1.50.0[src]
impl PartialEq<ContractPackageHash> for ContractPackageHash
[src]
fn eq(&self, other: &ContractPackageHash) -> bool
[src]
fn ne(&self, other: &ContractPackageHash) -> bool
[src]
impl PartialOrd<ContractPackageHash> for ContractPackageHash
[src]
fn partial_cmp(&self, other: &ContractPackageHash) -> Option<Ordering>
[src]
fn lt(&self, other: &ContractPackageHash) -> bool
[src]
fn le(&self, other: &ContractPackageHash) -> bool
[src]
fn gt(&self, other: &ContractPackageHash) -> bool
[src]
fn ge(&self, other: &ContractPackageHash) -> bool
[src]
impl Serialize for ContractPackageHash
[src]
impl StructuralEq for ContractPackageHash
[src]
impl StructuralPartialEq for ContractPackageHash
[src]
impl ToBytes for ContractPackageHash
[src]
fn to_bytes(&self) -> Result<Vec<u8>, Error>
[src]
fn serialized_length(&self) -> usize
[src]
fn into_bytes(self) -> Result<Vec<u8>, Error> where
Self: Sized,
[src]
Self: Sized,
impl TryFrom<&'_ [u8]> for ContractPackageHash
[src]
type Error = TryFromSliceForContractHashError
The type returned in the event of a conversion error.
fn try_from(bytes: &[u8]) -> Result<Self, TryFromSliceForContractHashError>
[src]
impl TryFrom<&'_ Vec<u8, Global>> for ContractPackageHash
[src]
Auto Trait Implementations
impl RefUnwindSafe for ContractPackageHash
[src]
impl Send for ContractPackageHash
[src]
impl Sync for ContractPackageHash
[src]
impl Unpin for ContractPackageHash
[src]
impl UnwindSafe for ContractPackageHash
[src]
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,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToHex for T where
T: AsRef<[u8]>,
[src]
T: AsRef<[u8]>,
pub fn encode_hex<U>(&self) -> U where
U: FromIterator<char>,
[src]
U: FromIterator<char>,
pub fn encode_hex_upper<U>(&self) -> U where
U: FromIterator<char>,
[src]
U: FromIterator<char>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
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.
pub 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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,