pub struct ExecutionParams<Unsigned, Signed> { /* private fields */ }
Expand description
Execution Params for increasing position.
Implementations§
Source§impl<T: Unsigned> ExecutionParams<T, T::Signed>
impl<T: Unsigned> ExecutionParams<T, T::Signed>
Sourcepub fn price_impact_value(&self) -> &T::Signed
pub fn price_impact_value(&self) -> &T::Signed
Get price impact value.
Sourcepub fn price_impact_amount(&self) -> &T::Signed
pub fn price_impact_amount(&self) -> &T::Signed
Get price impact amount.
Sourcepub fn size_delta_in_tokens(&self) -> &T
pub fn size_delta_in_tokens(&self) -> &T
Get size delta in tokens.
Sourcepub fn execution_price(&self) -> &T
pub fn execution_price(&self) -> &T
Get execution price.
Trait Implementations§
Source§impl<Unsigned, Signed> BorshDeserialize for ExecutionParams<Unsigned, Signed>where
Signed: BorshDeserialize,
Unsigned: BorshDeserialize,
impl<Unsigned, Signed> BorshDeserialize for ExecutionParams<Unsigned, Signed>where
Signed: BorshDeserialize,
Unsigned: BorshDeserialize,
fn deserialize_reader<R: Read>(reader: &mut R) -> Result<Self, Error>
§fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
Deserializes this instance from a given slice of bytes.
Updates the buffer to point at the remaining bytes.
§fn try_from_slice(v: &[u8]) -> Result<Self, Error>
fn try_from_slice(v: &[u8]) -> Result<Self, Error>
Deserialize this instance from a slice of bytes.
fn try_from_reader<R>(reader: &mut R) -> Result<Self, Error>where
R: Read,
Source§impl<Unsigned, Signed> BorshSerialize for ExecutionParams<Unsigned, Signed>where
Signed: BorshSerialize,
Unsigned: BorshSerialize,
impl<Unsigned, Signed> BorshSerialize for ExecutionParams<Unsigned, Signed>where
Signed: BorshSerialize,
Unsigned: BorshSerialize,
Source§impl<Unsigned: Clone, Signed: Clone> Clone for ExecutionParams<Unsigned, Signed>
impl<Unsigned: Clone, Signed: Clone> Clone for ExecutionParams<Unsigned, Signed>
Source§fn clone(&self) -> ExecutionParams<Unsigned, Signed>
fn clone(&self) -> ExecutionParams<Unsigned, Signed>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<Unsigned, Signed> InitSpace for ExecutionParams<Unsigned, Signed>
impl<Unsigned, Signed> InitSpace for ExecutionParams<Unsigned, Signed>
Source§const INIT_SPACE: usize
const INIT_SPACE: usize
Init Space.
impl<Unsigned: Copy, Signed: Copy> Copy for ExecutionParams<Unsigned, Signed>
Auto Trait Implementations§
impl<Unsigned, Signed> Freeze for ExecutionParams<Unsigned, Signed>
impl<Unsigned, Signed> RefUnwindSafe for ExecutionParams<Unsigned, Signed>where
Signed: RefUnwindSafe,
Unsigned: RefUnwindSafe,
impl<Unsigned, Signed> Send for ExecutionParams<Unsigned, Signed>
impl<Unsigned, Signed> Sync for ExecutionParams<Unsigned, Signed>
impl<Unsigned, Signed> Unpin for ExecutionParams<Unsigned, Signed>
impl<Unsigned, Signed> UnwindSafe for ExecutionParams<Unsigned, Signed>where
Signed: UnwindSafe,
Unsigned: UnwindSafe,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more