pub struct BorrowingFeeParams<T> { /* private fields */ }
Expand description
Borrowing Fee Parameters.
Implementations§
Source§impl<T> BorrowingFeeParams<T>
impl<T> BorrowingFeeParams<T>
Sourcepub fn builder() -> BorrowingFeeParamsBuilder<T, ((), (), (), (), (), ())>
pub fn builder() -> BorrowingFeeParamsBuilder<T, ((), (), (), (), (), ())>
Create a builder for building BorrowingFeeParams
.
On the builder, call .receiver_factor(...)
, .exponent_for_long(...)
, .exponent_for_short(...)
, .factor_for_long(...)
, .factor_for_short(...)
, .skip_borrowing_fee_for_smaller_side(...)
(optional) to set the values of the fields.
Finally, call .build()
to create the instance of BorrowingFeeParams
.
Source§impl<T> BorrowingFeeParams<T>
impl<T> BorrowingFeeParams<T>
Sourcepub fn skip_borrowing_fee_for_smaller_side(&self) -> bool
pub fn skip_borrowing_fee_for_smaller_side(&self) -> bool
Get whether to skip borrowing fee for smaller side.
Sourcepub fn receiver_factor(&self) -> &T
pub fn receiver_factor(&self) -> &T
Get borrowing fee receiver factor.
Trait Implementations§
Source§impl<T: Clone> Clone for BorrowingFeeParams<T>
impl<T: Clone> Clone for BorrowingFeeParams<T>
Source§fn clone(&self) -> BorrowingFeeParams<T>
fn clone(&self) -> BorrowingFeeParams<T>
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<T: Debug> Debug for BorrowingFeeParams<T>
impl<T: Debug> Debug for BorrowingFeeParams<T>
impl<T: Copy> Copy for BorrowingFeeParams<T>
Auto Trait Implementations§
impl<T> Freeze for BorrowingFeeParams<T>where
T: Freeze,
impl<T> RefUnwindSafe for BorrowingFeeParams<T>where
T: RefUnwindSafe,
impl<T> Send for BorrowingFeeParams<T>where
T: Send,
impl<T> Sync for BorrowingFeeParams<T>where
T: Sync,
impl<T> Unpin for BorrowingFeeParams<T>where
T: Unpin,
impl<T> UnwindSafe for BorrowingFeeParams<T>where
T: 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