pub struct BuilderSetting { /* private fields */ }Expand description
The builder orders are routed through, and what they pay it.
Implementations§
Source§impl BuilderSetting
impl BuilderSetting
percent of each market’s cap; None over 100.
Sourcepub const fn flat(address: Address, fee: BuilderFee) -> BuilderSetting
pub const fn flat(address: Address, fee: BuilderFee) -> BuilderSetting
fee on every market.
pub const fn address(&self) -> Address
pub const fn rule(&self) -> FeeRule
Sourcepub const fn fee_on(&self, kind: AssetKind) -> BuilderFee
pub const fn fee_on(&self, kind: AssetKind) -> BuilderFee
What an order on kind pays, whether the market allows it or not.
Sourcepub fn on(&self, kind: AssetKind) -> Result<Builder, OverCap>
pub fn on(&self, kind: AssetKind) -> Result<Builder, OverCap>
The builder an order on kind names, or why it cannot.
Sourcepub fn on_assets(
&self,
assets: impl IntoIterator<Item = Asset>,
) -> Result<Option<Builder>, OverCap>
pub fn on_assets( &self, assets: impl IntoIterator<Item = Asset>, ) -> Result<Option<Builder>, OverCap>
The builder one action over these assets names: held to the
strictest kind among them, so one perp order holds the whole action
to the perp cap. None for no assets.
Sourcepub fn most(&self) -> BuilderFee
pub fn most(&self) -> BuilderFee
The most an order on any market it may trade pays, which is what one approval has to cover: 880 at 88% of each cap.
Sourcepub fn approval(
&self,
order: &PlaceOrder,
approved: &Approved,
by: SignedBy,
) -> Result<Approval, ApprovalRefused>
pub fn approval( &self, order: &PlaceOrder, approved: &Approved, by: SignedBy, ) -> Result<Approval, ApprovalRefused>
What order needs before it is sent, by what the account has approved this builder to charge
and by who signs.
Trait Implementations§
Source§impl Clone for BuilderSetting
impl Clone for BuilderSetting
impl Copy for BuilderSetting
Source§impl Debug for BuilderSetting
impl Debug for BuilderSetting
impl Eq for BuilderSetting
Source§impl PartialEq for BuilderSetting
impl PartialEq for BuilderSetting
impl StructuralPartialEq for BuilderSetting
Auto Trait Implementations§
impl Freeze for BuilderSetting
impl RefUnwindSafe for BuilderSetting
impl Send for BuilderSetting
impl Sync for BuilderSetting
impl Unpin for BuilderSetting
impl UnsafeUnpin for BuilderSetting
impl UnwindSafe for BuilderSetting
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.