[][src]Struct casperlabs_contract_ffi::value::CLValue

pub struct CLValue { /* fields omitted */ }

Methods

impl CLValue[src]

pub fn from_t<T: CLTyped + ToBytes>(t: T) -> Result<CLValue, CLValueError>[src]

Constructs a CLValue from t.

pub fn into_t<T: CLTyped + FromBytes>(self) -> Result<T, CLValueError>[src]

Consumes and converts self back into its underlying type.

pub fn cl_type(&self) -> &CLType[src]

pub fn inner_bytes(&self) -> &Vec<u8>[src]

Returns a reference to the serialized form of the underlying value held in this CLValue.

pub fn serialized_len(&self) -> usize[src]

Returns the length of the Vec<u8> yielded after calling self.to_bytes().unwrap().

Note, this method doesn't actually serialize self, and hence is relatively cheap.

Trait Implementations

impl Clone for CLValue[src]

impl Debug for CLValue[src]

impl Eq for CLValue[src]

impl FromBytes for CLValue[src]

impl PartialEq<CLValue> for CLValue[src]

impl StructuralEq for CLValue[src]

impl StructuralPartialEq for CLValue[src]

impl ToBytes for CLValue[src]

Auto Trait Implementations

impl Send for CLValue

impl Sync for CLValue

impl Unpin for CLValue

Blanket Implementations

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

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

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

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

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

impl<T> Same<T> for T

type Output = T

Should always be Self

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

type Owned = T

The resulting type after obtaining ownership.

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.