[][src]Enum safe_nd::CoinsRequest

pub enum CoinsRequest {
    Transfer {
        destination: XorName,
        amount: Coins,
        transaction_id: TransactionId,
    },
    GetBalance,
    CreateBalance {
        new_balance_owner: PublicKey,
        amount: Coins,
        transaction_id: TransactionId,
    },
}

Coins request that is sent to vaults.

Variants

Transfer

Balance transfer.

Fields of Transfer

destination: XorName

The destination to transfer to.

amount: Coins

The amount in coins to transfer.

transaction_id: TransactionId

The ID of the transaction.

GetBalance

Get current wallet balance.

CreateBalance

Create a new coin balance.

Fields of CreateBalance

new_balance_owner: PublicKey

The new owner of the balance.

amount: Coins

The new balance amount in coins.

transaction_id: TransactionId

The ID of the transaction.

Implementations

impl CoinsRequest[src]

pub fn get_type(&self) -> Type[src]

Get the Type of this Request.

pub fn error_response(&self, error: Error) -> Response[src]

Creates a Response containing an error, with the Response variant corresponding to the Request variant.

pub fn authorisation_kind(&self) -> AuthorisationKind[src]

Returns the type of authorisation needed for the request.

pub fn dest_address(&self) -> Option<Cow<XorName>>[src]

Returns the address of the destination for request.

Trait Implementations

impl Clone for CoinsRequest[src]

impl Debug for CoinsRequest[src]

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

impl Eq for CoinsRequest[src]

impl Hash for CoinsRequest[src]

impl Ord for CoinsRequest[src]

impl PartialEq<CoinsRequest> for CoinsRequest[src]

impl PartialOrd<CoinsRequest> for CoinsRequest[src]

impl Serialize for CoinsRequest[src]

impl StructuralEq for CoinsRequest[src]

impl StructuralPartialEq for CoinsRequest[src]

Auto Trait Implementations

Blanket Implementations

impl<A> Actor for A where
    A: Clone + Ord + Hash
[src]

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> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

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

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

impl<T> Member for T where
    T: Clone + Eq + Hash
[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.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,