pub struct EncodedOrderIntent(/* private fields */);Expand description
Canonical 213-byte representation of an OrderIntent. The wire format and
the order UID preimage.
Layout: one character per byte, cell widths proportional to field size,
each divider belongs to the cell on its right. The byte range is
annotated below. Amounts and valid_to are little-endian encoded.
flags ────┐
┌───────────────────────────────┬───────────────────────────────┬───────────────────────────────┬───────────────────────────────┬───────────────────────────────┬───────┬───────┬───┬┬───────────────────────────────┐
│ │ │ │ │ │sell_ │buy_ │val││ │
│ owner │ sell_token_account │ sell_mint │ buy_token_account │ buy_mint │ │ │id_││ app_data │
│ │ │ │ │ │amount │amount │to ││ │
└───────────────────────────────┴───────────────────────────────┴───────────────────────────────┴───────────────────────────────┴───────────────────────────────┴───────┴───────┴───┴┴───────────────────────────────┘
0 32 64 96 128 160 168 176 180 213
181Implementations§
Trait Implementations§
Source§impl Clone for EncodedOrderIntent
impl Clone for EncodedOrderIntent
Source§impl Debug for EncodedOrderIntent
impl Debug for EncodedOrderIntent
Source§impl Deref for EncodedOrderIntent
impl Deref for EncodedOrderIntent
impl Eq for EncodedOrderIntent
Source§impl From<&EncodedOrderIntent> for [u8; 213]
impl From<&EncodedOrderIntent> for [u8; 213]
Source§fn from(encoded: &EncodedOrderIntent) -> Self
fn from(encoded: &EncodedOrderIntent) -> Self
Converts to this type from the input type.
Source§impl From<&OrderIntent> for EncodedOrderIntent
impl From<&OrderIntent> for EncodedOrderIntent
Source§fn from(intent: &OrderIntent) -> Self
fn from(intent: &OrderIntent) -> Self
Lays each side out the way the wire spells it.
Source§impl PartialEq for EncodedOrderIntent
impl PartialEq for EncodedOrderIntent
impl StructuralPartialEq for EncodedOrderIntent
Auto Trait Implementations§
impl Freeze for EncodedOrderIntent
impl RefUnwindSafe for EncodedOrderIntent
impl Send for EncodedOrderIntent
impl Sync for EncodedOrderIntent
impl Unpin for EncodedOrderIntent
impl UnsafeUnpin for EncodedOrderIntent
impl UnwindSafe for EncodedOrderIntent
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