#[repr(u8)]pub enum OrderType {
Limit = 0,
PostOnly = 1,
FillOrKill = 2,
ImmediateOrCancel = 3,
PostOnlySlide = 4,
PostOnlyFront = 5,
}Expand description
Order execution type.
Limit— standard limit orderPostOnly— maker-only, rejected if it would cross the bookImmediateOrCancel— use this for market orders (fill what you can, cancel the rest)FillOrKill— fill entirely or cancel
Variants§
Implementations§
Trait Implementations§
Source§impl BorshDeserialize for OrderType
impl BorshDeserialize for OrderType
fn deserialize_reader<__R>(reader: &mut __R) -> Result<OrderType, Error>where
__R: Read,
Source§fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
Deserializes this instance from a given slice of bytes.
Updates the buffer to point at the remaining bytes.
Source§fn try_from_slice(v: &[u8]) -> Result<Self, Error>
fn try_from_slice(v: &[u8]) -> Result<Self, Error>
Deserialize this instance from a slice of bytes.
fn try_from_reader<R>(reader: &mut R) -> Result<Self, Error>where
R: Read,
Source§impl BorshSerialize for OrderType
impl BorshSerialize for OrderType
Source§impl<'de> Deserialize<'de> for OrderType
impl<'de> Deserialize<'de> for OrderType
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<OrderType, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<OrderType, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl JsonSchema for OrderType
impl JsonSchema for OrderType
Source§fn schema_name() -> String
fn schema_name() -> String
The name of the generated JSON Schema. Read more
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
Whether JSON Schemas generated for this type should be re-used where possible using the
$ref keyword. Read moreSource§impl Ord for OrderType
impl Ord for OrderType
Source§impl PartialOrd for OrderType
impl PartialOrd for OrderType
Source§impl Serialize for OrderType
impl Serialize for OrderType
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Source§impl UniversalWallet for OrderTypewhere
OrderType: 'static,
impl UniversalWallet for OrderTypewhere
OrderType: 'static,
Source§fn scaffold() -> Item<IndexLinking>
fn scaffold() -> Item<IndexLinking>
Generate the “scaffolding” of the item. If the item is a primtive, this is just the corresponding primtive.
If the type is composed of other types, this is the container with all links set to
Link::Placeholder.Source§fn get_child_links(schema: &mut Schema) -> Vec<Link>
fn get_child_links(schema: &mut Schema) -> Vec<Link>
Ensure that each type contained in the outer type (i.e. the type of each struct/tuple field) is added to the schema,
and return a
Link connecting the child to the parent. Read moreSource§fn get_child_templates(schema: &mut Schema) -> TransactionTemplateSet
fn get_child_templates(schema: &mut Schema) -> TransactionTemplateSet
Empty by default
When derived by the macro, builds a template set from annotations on the fields + the field
types’ own get_child_templates()
Source§fn write_schema(schema: &mut Schema) -> Link
fn write_schema(schema: &mut Schema) -> Link
Writes the type to the schema if it is not already present and returns a link to it. Read more
Source§fn make_root_of(schema: &mut Schema)
fn make_root_of(schema: &mut Schema)
Writes the type and all its children to the schema, if not already present, and sets the
type as a root type. Generates any templates defined on that type.
Source§fn make_linkable(schema: &mut Schema) -> Link
fn make_linkable(schema: &mut Schema) -> Link
Gets a link to the type, writing the type to the schema if necessary.
Source§fn id_override() -> Option<ItemId>
fn id_override() -> Option<ItemId>
Override the type ID of the item. This should typically not be written by hand. Instead,
use the
OverrideSchema trait.impl Copy for OrderType
impl Eq for OrderType
impl StructuralPartialEq for OrderType
Auto Trait Implementations§
impl Freeze for OrderType
impl RefUnwindSafe for OrderType
impl Send for OrderType
impl Sync for OrderType
impl Unpin for OrderType
impl UnsafeUnpin for OrderType
impl UnwindSafe for OrderType
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.