Struct casper_types::Transfer
source · pub struct Transfer {
pub deploy_hash: DeployHash,
pub from: AccountHash,
pub to: Option<AccountHash>,
pub source: URef,
pub target: URef,
pub amount: U512,
pub gas: U512,
pub id: Option<u64>,
}
Expand description
Represents a transfer from one purse to another
Fields§
§deploy_hash: DeployHash
Deploy that created the transfer
from: AccountHash
Account from which transfer was executed
to: Option<AccountHash>
Account to which funds are transferred
source: URef
Source purse
target: URef
Target purse
amount: U512
Transfer amount
gas: U512
Gas
id: Option<u64>
User-defined id
Implementations§
Trait Implementations§
source§impl<'de> Deserialize<'de> for Transfer
impl<'de> Deserialize<'de> for Transfer
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Ord for Transfer
impl Ord for Transfer
source§impl PartialEq for Transfer
impl PartialEq for Transfer
source§impl PartialOrd for Transfer
impl PartialOrd for Transfer
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl ToBytes for Transfer
impl ToBytes for Transfer
source§fn serialized_length(&self) -> usize
fn serialized_length(&self) -> usize
Returns the length of the
Vec<u8>
which would be returned from a successful call to
to_bytes()
or into_bytes()
. The data is not actually serialized, so this call is
relatively cheap.source§impl TryFrom<StoredValue> for Transfer
impl TryFrom<StoredValue> for Transfer
§type Error = TypeMismatch
type Error = TypeMismatch
The type returned in the event of a conversion error.
impl Copy for Transfer
impl Eq for Transfer
impl StructuralEq for Transfer
impl StructuralPartialEq for Transfer
Auto Trait Implementations§
impl RefUnwindSafe for Transfer
impl Send for Transfer
impl Sync for Transfer
impl Unpin for Transfer
impl UnwindSafe for Transfer
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