Struct TestMarketConfig

Source
pub struct TestMarketConfig<T, const DECIMALS: u8> {
Show 19 fields pub swap_impact_params: PriceImpactParams<T>, pub swap_fee_params: FeeParams<T>, pub position_params: PositionParams<T>, pub position_impact_params: PriceImpactParams<T>, pub order_fee_params: FeeParams<T>, pub position_impact_distribution_params: PositionImpactDistributionParams<T>, pub borrowing_fee_params: BorrowingFeeParams<T>, pub borrowing_fee_kink_model_params: BorrowingFeeKinkModelParamsForOneSide<T>, pub funding_fee_params: FundingFeeParams<T>, pub reserve_factor: T, pub open_interest_reserve_factor: T, pub max_pnl_factors: MaxPnlFactors<T>, pub min_pnl_factor_after_adl: T, pub max_pool_amount: T, pub max_pool_value_for_deposit: T, pub max_open_interest: T, pub min_collateral_factor_for_oi: T, pub ignore_open_interest_for_usage_factor: bool, pub liquidation_fee_params: LiquidationFeeParams<T>,
}
Available on crate feature test only.
Expand description

Test Market Config.

Fields§

§swap_impact_params: PriceImpactParams<T>

Swap impact params.

§swap_fee_params: FeeParams<T>

Swap fee params.

§position_params: PositionParams<T>

Position params.

§position_impact_params: PriceImpactParams<T>

Position impact params.

§order_fee_params: FeeParams<T>

Order fee params.

§position_impact_distribution_params: PositionImpactDistributionParams<T>

Position impact distribution params.

§borrowing_fee_params: BorrowingFeeParams<T>

Borrowing fee params.

§borrowing_fee_kink_model_params: BorrowingFeeKinkModelParamsForOneSide<T>

Borrowing fee kink model params.

§funding_fee_params: FundingFeeParams<T>

Funding fee params.

§reserve_factor: T

Reserve factor.

§open_interest_reserve_factor: T

Open interest reserve factor.

§max_pnl_factors: MaxPnlFactors<T>

Max PnL factors.

§min_pnl_factor_after_adl: T

Min PnL factors after ADL.

§max_pool_amount: T

Max pool amount.

§max_pool_value_for_deposit: T

Max pool value for deposit.

§max_open_interest: T

Max open interest.

§min_collateral_factor_for_oi: T

Min collateral factor for OI.

§ignore_open_interest_for_usage_factor: bool

Ignore open interest for usage factor.

§liquidation_fee_params: LiquidationFeeParams<T>

Liquidation fee params.

Trait Implementations§

Source§

impl<T: Clone, const DECIMALS: u8> Clone for TestMarketConfig<T, DECIMALS>

Source§

fn clone(&self) -> TestMarketConfig<T, DECIMALS>

Returns a duplicate of the value. Read more
1.0.0 · Source§

const fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<T: Debug, const DECIMALS: u8> Debug for TestMarketConfig<T, DECIMALS>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for TestMarketConfig<u128, 20>

Available on crate feature u128 only.
Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Default for TestMarketConfig<u64, 9>

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl<T, const DECIMALS: u8> Freeze for TestMarketConfig<T, DECIMALS>
where T: Freeze,

§

impl<T, const DECIMALS: u8> RefUnwindSafe for TestMarketConfig<T, DECIMALS>
where T: RefUnwindSafe,

§

impl<T, const DECIMALS: u8> Send for TestMarketConfig<T, DECIMALS>
where T: Send,

§

impl<T, const DECIMALS: u8> Sync for TestMarketConfig<T, DECIMALS>
where T: Sync,

§

impl<T, const DECIMALS: u8> Unpin for TestMarketConfig<T, DECIMALS>
where T: Unpin,

§

impl<T, const DECIMALS: u8> UnwindSafe for TestMarketConfig<T, DECIMALS>
where T: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V