[−][src]Enum casperlabs_contract_ffi::key::Key
Variants
Account([u8; 32])
Hash([u8; 32])
URef(URef)
Local([u8; 32])
Methods
impl Key
[src]
pub fn local(seed: [u8; 32], key_bytes: &[u8]) -> Self
[src]
pub fn type_string(&self) -> String
[src]
impl Key
[src]
pub fn to_u_ptr<T>(self) -> Option<UPointer<T>>
[src]
pub fn to_c_ptr(self) -> Option<ContractPointer>
[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(addr: &str) -> Option<Key>
[src]
Creates an instance of Key::Hash variant from the base16 encoded
String. Returns None
if [addr] is not valid Blake2b hash.
pub fn parse_uref(addr: &str, access_rights: AccessRights) -> Option<Key>
[src]
Creates an instance of Key::URef variant from the base16 encoded
String. Returns None
if [addr] is not valid Blake2b hash.
pub fn parse_local(seed: &str, key_hash: &str) -> Option<Key>
[src]
Creates an instance of Key::Local variant from the base16 encoded
String. Returns None
if either [seed] or [key_hash] is not valid
Blake2b hash.
pub fn as_string(&self) -> String
[src]
pub fn as_uref(&self) -> Option<&URef>
[src]
Trait Implementations
impl ToBytes for Key
[src]
impl FromBytes for Key
[src]
fn from_bytes(bytes: &[u8]) -> Result<(Self, &[u8]), Error>
[src]
impl PartialEq<Key> for Key
[src]
impl Eq for Key
[src]
impl Ord for Key
[src]
fn cmp(&self, other: &Key) -> Ordering
[src]
fn max(self, other: Self) -> Self
1.21.0[src]
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.21.0[src]
Compares and returns the minimum of two values. Read more
fn clamp(self, min: Self, max: Self) -> Self
[src]
clamp
)Restrict a value to a certain interval. Read more
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 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,
Feeds a slice of this type into the given [Hasher
]. Read more
impl Display for Key
[src]
impl Debug for Key
[src]
impl TryFrom<Value> for Key
[src]
type Error = String
The type returned in the event of a conversion error.
fn try_from(v: Value) -> Result<Key, String>
[src]
impl<T> From<UPointer<T>> for Key
[src]
impl From<ContractPointer> for Key
[src]
fn from(c_ptr: ContractPointer) -> Self
[src]
impl From<URef> for Key
[src]
impl From<Key> for Value
[src]
impl Copy for Key
[src]
impl Clone for Key
[src]
Auto Trait Implementations
Blanket Implementations
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> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[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.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
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> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
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> Same<T> for T
type Output = T
Should always be Self