[−][src]Enum casperlabs_contract_ffi::key::Key
Variants
URef(URef)
Methods
impl Key
[src]
pub fn local(seed: [u8; 32], key_bytes: &[u8]) -> Self
[src]
pub fn type_string(&self) -> String
[src]
pub fn serialized_size(&self) -> usize
[src]
Calculates serialized size without actually serializing data.
pub const fn serialized_size_hint() -> usize
[src]
Returns max size a Key
can be serialized into.
impl Key
[src]
pub fn to_turef<T: CLTyped>(self) -> Option<TURef<T>>
[src]
pub fn to_contract_ref(self) -> Option<ContractRef>
[src]
pub fn as_account(&self) -> Option<[u8; 32]>
[src]
Returns bytes of an account
pub fn normalize(self) -> Key
[src]
pub fn parse_hash(hex_encodede_hash: &str) -> Option<Key>
[src]
Creates an instance of Key::Hash
from the hex-encoded string. Returns None
if
hex_encodede_hash
does not decode to a 32-byte array.
pub fn parse_uref(
hex_encoded_uref: &str,
access_rights: AccessRights
) -> Option<Key>
[src]
hex_encoded_uref: &str,
access_rights: AccessRights
) -> Option<Key>
Creates an instance of Key::URef
from the hex-encoded string. Returns None
if
hex_encoded_uref
does not decode to a 32-byte array.
pub fn parse_local(
hex_encoded_seed: &str,
hex_encoded_key_bytes: &str
) -> Option<Key>
[src]
hex_encoded_seed: &str,
hex_encoded_key_bytes: &str
) -> Option<Key>
Creates an instance of Key::Local
from the hex-encoded strings. Returns None
if
hex_encoded_seed
does not decode to a 32-byte array, or if hex_encoded_key_bytes
does
does not decode from hex.
pub fn as_string(&self) -> String
[src]
pub fn as_uref(&self) -> Option<&URef>
[src]
pub fn into_uref(self) -> Option<URef>
[src]
pub fn as_hash(&self) -> Option<[u8; 32]>
[src]
pub fn as_local(&self) -> Option<[u8; 32]>
[src]
Trait Implementations
impl CLTyped for Key
[src]
impl Clone for Key
[src]
fn clone(&self) -> Key
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for Key
[src]
impl Debug for Key
[src]
impl Display for Key
[src]
impl Eq for Key
[src]
impl From<ContractRef> for Key
[src]
fn from(contract_ref: ContractRef) -> Self
[src]
impl<T: CLTyped> From<TURef<T>> for Key
[src]
impl From<URef> for Key
[src]
impl FromBytes for Key
[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 Key
[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 Ord for Key
[src]
fn cmp(&self, other: &Key) -> Ordering
[src]
fn max(self, other: Self) -> Self
1.21.0[src]
fn min(self, other: Self) -> Self
1.21.0[src]
fn clamp(self, min: Self, max: Self) -> Self
[src]
impl PartialEq<Key> for Key
[src]
impl PartialOrd<Key> for Key
[src]
fn partial_cmp(&self, other: &Key) -> Option<Ordering>
[src]
fn lt(&self, other: &Key) -> bool
[src]
fn le(&self, other: &Key) -> bool
[src]
fn gt(&self, other: &Key) -> bool
[src]
fn ge(&self, other: &Key) -> bool
[src]
impl StructuralEq for Key
[src]
impl StructuralPartialEq for Key
[src]
impl ToBytes for Key
[src]
Auto Trait Implementations
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> Same<T> for T
type Output = T
Should always be Self
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> 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.
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>,