pub struct Flags {
pub kind: OrderKind,
pub partially_fillable: bool,
}Expand description
Collection of OrderIntent fields that can be represented as a single bit.
Fields§
§kind: OrderKindWhether sell_amount or buy_amount is the exact figure; the
other side is treated as the limit (minimum to receive for Sell,
maximum to spend for Buy).
partially_fillable: boolIf true, the order may be filled across multiple settlements;
proceeds and consumption scale proportionally with the amount of
the sell side that’s been used. If false, a single settlement
must consume the full sell amount (fill-or-kill).
Trait Implementations§
impl Copy for Flags
impl Eq for Flags
impl StructuralPartialEq for Flags
Source§impl TryFrom<[u8; 1]> for Flags
impl TryFrom<[u8; 1]> for Flags
Source§fn try_from(bytes: [u8; 1]) -> Result<Self, Self::Error>
fn try_from(bytes: [u8; 1]) -> Result<Self, Self::Error>
Decodes a flags byte, rejecting any reserved bit with
ProgramError::InvalidInstructionData. A reserved bit carries no
meaning to this version of the program, so accepting it would give the
same flags several encodings, and with them several UIDs.
Source§type Error = ProgramError
type Error = ProgramError
The type returned in the event of a conversion error.
Auto Trait Implementations§
impl Freeze for Flags
impl RefUnwindSafe for Flags
impl Send for Flags
impl Sync for Flags
impl Unpin for Flags
impl UnsafeUnpin for Flags
impl UnwindSafe for Flags
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