pub struct Flags {
pub created_on_chain: bool,
pub kind: OrderKind,
pub partially_fillable: bool,
}Expand description
Collection of OrderIntent fields that can be represented as a single bit.
Fields§
§created_on_chain: boolHow the order is authenticated: true if the owner creates it
themselves with a CreateOrder instruction they sign; false if it’s
authenticated off-chain by an Ed25519 signature, which lets anyone
holding that signature create the order.
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.