Enum fixity::value::Value[][src]

pub enum Value {
    Addr(Addr),
    Uint32(u32),
    String(String),
    Vec(Vec<Scalar>),
}

Variants

Addr(Addr)
Uint32(u32)
String(String)
Vec(Vec<Scalar>)

Implementations

impl Value[src]

pub fn from_cli_str(s: &str) -> Result<Self, Error>[src]

An experimental implementation to parse a Value value from a string focused interface; eg parsing values from the command line.

This differs from a FromStr implementation in that there may be multiple interfaces tailored towards different user interfaces.

impl Value[src]

pub fn addr(&self) -> Option<&Addr>[src]

Return the underlying Addr if the variant is an Addr, None otherwise.

pub fn into_addr(self) -> Option<Addr>[src]

Return the underlying Addr if the variant is an Addr, None otherwise.

Trait Implementations

impl BorshDeserialize for Value where
    Addr: BorshDeserialize,
    u32: BorshDeserialize,
    String: BorshDeserialize,
    Vec<Scalar>: BorshDeserialize
[src]

impl BorshSerialize for Value where
    Addr: BorshSerialize,
    u32: BorshSerialize,
    String: BorshSerialize,
    Vec<Scalar>: BorshSerialize
[src]

impl Clone for Value[src]

impl Debug for Value[src]

impl<'de> Deserialize<'de> for Value[src]

impl Display for Value[src]

impl Eq for Value[src]

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

impl Hash for Value[src]

impl Ord for Value[src]

impl PartialEq<Value> for Value[src]

impl PartialOrd<Value> for Value[src]

impl Serialize for Value[src]

impl StructuralEq for Value[src]

impl StructuralPartialEq for Value[src]

Auto Trait Implementations

impl RefUnwindSafe for Value

impl Send for Value

impl Sync for Value

impl Unpin for Value

impl UnwindSafe for Value

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> Conv for T

impl<T> Conv for T

impl<T> Deserialize for T where
    T: BorshDeserialize + DeserializeOwned
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> FmtForward for T

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

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

impl<T> Pipe for T where
    T: ?Sized

impl<T> Pipe for T

impl<T> PipeAsRef for T

impl<T> PipeBorrow for T

impl<T> PipeDeref for T

impl<T> PipeRef for T

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> Serialize for T where
    T: BorshSerialize + Serialize
[src]

impl<T> Tap for T

impl<T> Tap for T

impl<T, U> TapAsRef<U> for T where
    U: ?Sized

impl<T, U> TapBorrow<U> for T where
    U: ?Sized

impl<T> TapDeref for T

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> TryConv for T

impl<T> TryConv for T

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.