pub struct FeeModelHandle(/* private fields */);Expand description
Shared runtime handle for a fee model.
Implementations§
Source§impl FeeModelHandle
impl FeeModelHandle
Sourcepub fn new<T>(model: T) -> Selfwhere
T: FeeModel + 'static,
pub fn new<T>(model: T) -> Selfwhere
T: FeeModel + 'static,
Creates a new FeeModelHandle from a fee model.
Sourcepub fn from_rc(model: Rc<dyn FeeModel>) -> Self
pub fn from_rc(model: Rc<dyn FeeModel>) -> Self
Creates a new FeeModelHandle from an existing reference-counted model.
Trait Implementations§
Source§impl Clone for FeeModelHandle
impl Clone for FeeModelHandle
Source§fn clone(&self) -> FeeModelHandle
fn clone(&self) -> FeeModelHandle
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for FeeModelHandle
impl Debug for FeeModelHandle
Source§impl Default for FeeModelHandle
impl Default for FeeModelHandle
Source§impl FeeModel for FeeModelHandle
impl FeeModel for FeeModelHandle
Source§fn get_commission(
&self,
order: &OrderAny,
fill_quantity: Quantity,
fill_px: Price,
instrument: &InstrumentAny,
) -> Result<Money>
fn get_commission( &self, order: &OrderAny, fill_quantity: Quantity, fill_px: Price, instrument: &InstrumentAny, ) -> Result<Money>
Calculates commission for a fill. Read more
Source§impl From<FeeModelAny> for FeeModelHandle
impl From<FeeModelAny> for FeeModelHandle
Source§fn from(model: FeeModelAny) -> Self
fn from(model: FeeModelAny) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for FeeModelHandle
impl !Send for FeeModelHandle
impl !Sync for FeeModelHandle
impl !UnwindSafe for FeeModelHandle
impl Freeze for FeeModelHandle
impl Unpin for FeeModelHandle
impl UnsafeUnpin for FeeModelHandle
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