pub struct Transfer {
pub id: TransferId,
pub debit_account: AccountId,
pub credit_account: AccountId,
pub unit: UnitId,
pub amount: u128,
pub grant_cid: Option<Cid>,
pub user_data: [u8; 32],
}Expand description
A value movement between two accounts of the same unit (INV-1(b): one
unit field, never two — cross-issuer movement is two linked transfers).
Fields§
§id: TransferIdIdempotency key (for reserve this is also the pending reservation id).
debit_account: AccountIdAccount debited.
credit_account: AccountIdAccount credited.
unit: UnitIdThe unit; must equal both accounts’ unit.
amount: u128Amount in minor units; must be > 0.
grant_cid: Option<Cid>The UCAN allocation this spend draws on.
user_data: [u8; 32]Opaque correlation.
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
impl Eq for Transfer
impl StructuralPartialEq for Transfer
Auto Trait Implementations§
impl Freeze for Transfer
impl RefUnwindSafe for Transfer
impl Send for Transfer
impl Sync for Transfer
impl Unpin for Transfer
impl UnsafeUnpin 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