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.
pub fn one(order: Order) -> PlaceOrder
pub fn grouped(self, grouping: Grouping) -> PlaceOrder
pub fn through(self, builder: Builder) -> PlaceOrder
pub fn orders(&self) -> &[Order]
pub const fn grouping(&self) -> Grouping
pub const fn builder(&self) -> Option<Builder>
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.
fn msgpack(&self) -> Vec<u8> ⓘ
fn connection_id(&self, nonce: u64, vault: Option<Address>) -> [u8; 32]
fn typed( &self, nonce: u64, vault: Option<Address>, network: Network, ) -> TypedStruct<'static>
fn digest( &self, nonce: u64, vault: Option<Address>, network: Network, ) -> [u8; 32]
Source§fn wallet_json(
&self,
nonce: u64,
vault: Option<Address>,
network: Network,
) -> String
fn wallet_json( &self, nonce: u64, vault: Option<Address>, network: Network, ) -> String
For a master wallet signing in the browser. It needs chain 1337.
fn body( &self, nonce: u64, signature: &Signature, vault: Option<Address>, ) -> String
Source§impl PartialEq for PlaceOrder
impl PartialEq for PlaceOrder
impl StructuralPartialEq for PlaceOrder
Auto Trait Implementations§
impl Freeze 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.