[][src]Struct casperlabs_contract_ffi::uref::URef

pub struct URef(_, _);

Represents an unforgeable reference

Methods

impl URef[src]

pub fn new(id: [u8; 32], access_rights: AccessRights) -> Self[src]

Creates a URef from an id and access rights.

pub fn addr(&self) -> [u8; 32][src]

Returns the address of this URef.

pub fn access_rights(&self) -> Option<AccessRights>[src]

Returns the access rights of this URef.

pub fn remove_access_rights(self) -> Self[src]

Removes the access rights from this URef.

pub fn is_readable(self) -> bool[src]

pub fn is_writeable(self) -> bool[src]

pub fn is_addable(self) -> bool[src]

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

Formats address and its access rights in an unique way that could be used as a name when storing given uref in a global state.

Trait Implementations

impl ToBytes for URef[src]

impl FromBytes for URef[src]

impl PartialEq<URef> for URef[src]

impl Eq for URef[src]

impl Ord for URef[src]

fn max(self, other: Self) -> Self1.21.0[src]

Compares and returns the maximum of two values. Read more

fn min(self, other: Self) -> Self1.21.0[src]

Compares and returns the minimum of two values. Read more

fn clamp(self, min: Self, max: Self) -> Self[src]

🔬 This is a nightly-only experimental API. (clamp)

Restrict a value to a certain interval. Read more

impl PartialOrd<URef> for URef[src]

impl Hash for URef[src]

fn hash_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher
1.3.0[src]

Feeds a slice of this type into the given [Hasher]. Read more

impl Display for URef[src]

impl Debug for URef[src]

impl From<URef> for Key[src]

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

impl From<URef> for Value[src]

impl Copy for URef[src]

impl Clone for URef[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

Auto Trait Implementations

impl Unpin for URef

impl Send for URef

impl Sync for URef

Blanket Implementations

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> Into<U> for T where
    U: From<T>, 
[src]

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

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<T> Borrow<T> for T where
    T: ?Sized
[src]

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

impl<T> Any for T where
    T: 'static + ?Sized
[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> Same<T> for T

type Output = T

Should always be Self