pub struct PoolSwap { /* private fields */ }Expand description
Represents a trade between two tokens at a given price on a pool.
Implementations§
Source§impl PoolSwap
impl PoolSwap
pub fn new( amount_in: BigUint, amount_out: BigUint, new_state: Box<dyn ProtocolSim>, price_points: Option<Vec<(BigUint, BigUint, f64)>>, ) -> Self
pub fn amount_in(&self) -> &BigUint
pub fn amount_out(&self) -> &BigUint
pub fn new_state(&self) -> &dyn ProtocolSim
pub fn price_points(&self) -> &Option<Vec<(BigUint, BigUint, f64)>>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PoolSwap
impl !RefUnwindSafe for PoolSwap
impl Send for PoolSwap
impl Sync for PoolSwap
impl Unpin for PoolSwap
impl !UnwindSafe for PoolSwap
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)