Enum casper_types::TransferredTo
source · #[repr(i32)]pub enum TransferredTo {
ExistingAccount = 0,
NewAccount = 1,
}
Expand description
The result of a successful transfer between purses.
Variants§
ExistingAccount = 0
The destination account already existed.
NewAccount = 1
The destination account was created.
Implementations§
source§impl TransferredTo
impl TransferredTo
sourcepub fn result_from(value: i32) -> TransferResult
pub fn result_from(value: i32) -> TransferResult
Converts an i32
to a TransferResult
, where:
0
representsOk(TransferredTo::ExistingAccount)
,1
representsOk(TransferredTo::NewAccount)
,- all other inputs are mapped to
Err(ApiError::Transfer)
.
Trait Implementations§
source§impl Clone for TransferredTo
impl Clone for TransferredTo
source§fn clone(&self) -> TransferredTo
fn clone(&self) -> TransferredTo
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for TransferredTo
impl Debug for TransferredTo
source§impl PartialEq for TransferredTo
impl PartialEq for TransferredTo
source§fn eq(&self, other: &TransferredTo) -> bool
fn eq(&self, other: &TransferredTo) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for TransferredTo
impl Eq for TransferredTo
impl StructuralEq for TransferredTo
impl StructuralPartialEq for TransferredTo
Auto Trait Implementations§
impl RefUnwindSafe for TransferredTo
impl Send for TransferredTo
impl Sync for TransferredTo
impl Unpin for TransferredTo
impl UnwindSafe for TransferredTo
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more