pub struct PlaceOrder { /* private fields */ }Expand description
order: one or more orders, grouped, optionally through a builder.
Implementations§
Source§impl PlaceOrder
impl PlaceOrder
Sourcepub fn new(orders: Vec<Order>) -> PlaceOrder
pub fn new(orders: Vec<Order>) -> PlaceOrder
A scale is one action with an order a level.
Sourcepub fn one(order: Order) -> PlaceOrder
pub fn one(order: Order) -> PlaceOrder
One order, grouped na.
Sourcepub fn grouped(self, grouping: Grouping) -> PlaceOrder
pub fn grouped(self, grouping: Grouping) -> PlaceOrder
With this grouping.
Sourcepub fn through(self, builder: Builder) -> PlaceOrder
pub fn through(self, builder: Builder) -> PlaceOrder
Routed through builder, which the action names last.
Sourcepub const fn builder(&self) -> Option<Builder>
pub const fn builder(&self) -> Option<Builder>
The builder it is routed through; None for none.
Sourcepub fn over_builder_cap(&self) -> Option<OverCap>
pub fn over_builder_cap(&self) -> Option<OverCap>
The builder’s fee, when it is more than the venue lets a builder take on these orders. One perp order holds the whole action to the perp cap.
Trait Implementations§
Source§impl Clone for PlaceOrder
impl Clone for PlaceOrder
Source§impl Debug for PlaceOrder
impl Debug for PlaceOrder
impl Eq for PlaceOrder
Source§impl From<PlaceOrder> for TradeAction
impl From<PlaceOrder> for TradeAction
Source§fn from(action: PlaceOrder) -> TradeAction
fn from(action: PlaceOrder) -> TradeAction
Converts to this type from the input type.
Source§impl L1Action for PlaceOrder
impl L1Action for PlaceOrder
Source§fn action(&self) -> Map
fn action(&self) -> Map
The action’s keys and values in wire order, which is the hashed order.
Source§fn msgpack(&self) -> Vec<u8> ⓘ
fn msgpack(&self) -> Vec<u8> ⓘ
The action as msgpack bytes, the first part of the connection id’s hash.
Source§fn typed(
&self,
nonce: u64,
vault: Option<Address>,
network: Network,
) -> TypedStruct<'static>
fn typed( &self, nonce: u64, vault: Option<Address>, network: Network, ) -> TypedStruct<'static>
The phantom agent struct the key signs for this action.
Source§fn digest(
&self,
nonce: u64,
vault: Option<Address>,
network: Network,
) -> [u8; 32]
fn digest( &self, nonce: u64, vault: Option<Address>, network: Network, ) -> [u8; 32]
What the key signs for this action: the phantom agent’s digest under
Domain::EXCHANGE.Source§impl PartialEq for PlaceOrder
impl PartialEq for PlaceOrder
impl StructuralPartialEq for PlaceOrder
Auto Trait Implementations§
impl Forget for PlaceOrder
impl Freeze for PlaceOrder
impl Move for PlaceOrder
impl RefUnwindSafe for PlaceOrder
impl Send for PlaceOrder
impl Sync for PlaceOrder
impl Unpin for PlaceOrder
impl UnsafeUnpin for PlaceOrder
impl UnwindSafe for PlaceOrder
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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.