Struct Market

Source
#[repr(C)]
pub struct Market { pub store: Pubkey, /* private fields */ }
Expand description

Market.

Fields§

§store: Pubkey

Store.

Implementations§

Source§

impl Market

Source

pub fn find_market_address( store: &Pubkey, token: &Pubkey, store_program_id: &Pubkey, ) -> (Pubkey, u8)

Find PDA for Market account.

Source

pub fn init( &mut self, bump: u8, store: Pubkey, name: &str, market_token_mint: Pubkey, index_token_mint: Pubkey, long_token_mint: Pubkey, short_token_mint: Pubkey, is_enabled: bool, ) -> Result<(), Error>

Initialize the market.

Source

pub fn meta(&self) -> &MarketMeta

Get meta.

Source

pub fn validated_meta(&self, store: &Pubkey) -> Result<&MarketMeta, Error>

Get validated meta.

Source

pub fn name(&self) -> Result<&str, Error>

Get name.

Source

pub fn description(&self) -> Result<String, Error>

Description.

Source

pub fn flag(&self, flag: MarketFlag) -> bool

Get flag.

Source

pub fn set_flag(&mut self, flag: MarketFlag, value: bool) -> bool

Set flag.

Return the previous value.

Source

pub fn is_pure(&self) -> bool

Is this market a pure market, i.e., a single token market.

Source

pub fn is_enabled(&self) -> bool

Is this market enabled.

Source

pub fn set_enabled(&mut self, enabled: bool) -> bool

Set enabled.

Return previous value.

Source

pub fn is_adl_enabled(&self, is_long: bool) -> bool

Is ADL enabled.

Source

pub fn set_adl_enabled(&mut self, is_long: bool, enabled: bool) -> bool

Set ADL enabled.

Return previous value.

Source

pub fn is_gt_minting_enabled(&self) -> bool

Is GT Minting enabled.

Source

pub fn set_is_gt_minting_enbaled(&mut self, enabled: bool) -> bool

Set whether the GT minting is enabled.

Return the previous value.

Source

pub fn pool(&self, kind: PoolKind) -> Option<Pool>

Get pool of the given kind.

Source

pub fn try_pool(&self, kind: PoolKind) -> Result<&Pool, Error>

Try to get pool of the given kind.

Source

pub fn clock(&self, kind: ClockKind) -> Option<i64>

Get clock of the given kind.

Source

pub fn validate(&self, store: &Pubkey) -> Result<(), Error>

Validate the market.

Source

pub fn get_config(&self, key: &str) -> Result<&u128, Error>

Get config.

Source

pub fn get_config_by_key(&self, key: MarketConfigKey) -> Option<&u128>

Get config by key.

Source

pub fn get_config_mut(&mut self, key: &str) -> Result<&mut u128, Error>

Get config mutably.

Source

pub fn get_config_flag(&self, key: &str) -> Result<bool, Error>

Get config flag.

Source

pub fn get_config_flag_by_key(&self, key: MarketConfigFlag) -> bool

Get config flag by key.

Source

pub fn set_config_flag(&mut self, key: &str, value: bool) -> Result<bool, Error>

Set config flag.

Returns previous value.

Source

pub fn state(&self) -> &OtherState

Get other market state.

Source

pub fn indexer(&self) -> &Indexer

Get market indexer.

Source

pub fn indexer_mut(&mut self) -> &mut Indexer

Get market indexer mutably.

Source

pub fn update_config_with_buffer( &mut self, buffer: &MarketConfigBuffer, ) -> Result<(), Error>

Update config with buffer.

Source

pub fn prices(&self, oracle: &Oracle) -> Result<Prices<u128>, Error>

Get prices from oracle.

Source

pub fn max_pool_value_for_deposit( &self, is_long_token: bool, ) -> Result<u128, Error>

Get max pool value for deposit.

Source

pub fn as_liquidity_market<'a>( &'a self, market_token: &'a Mint, ) -> AsLiquidityMarket<'a, Market>

As a liquidity market.

Source

pub fn validate_shiftable(&self, target: &Market) -> Result<(), Error>

Validate that this market is shiftable to the target market.

Trait Implementations§

Source§

impl AccountDeserialize for Market

Source§

fn try_deserialize(buf: &mut &[u8]) -> Result<Market, Error>

Deserializes previously initialized account data. Should fail for all uninitialized accounts, where the bytes are zeroed. Implementations should be unique to a particular account type so that one can never successfully deserialize the data of one account type into another. For example, if the SPL token program were to implement this trait, it should be impossible to deserialize a Mint account into a token Account.
Source§

fn try_deserialize_unchecked(buf: &mut &[u8]) -> Result<Market, Error>

Deserializes account data without checking the account discriminator. This should only be used on account initialization, when the bytes of the account are zeroed.
Source§

impl Adl for Market

Source§

fn latest_adl_time(&self, is_long: bool) -> Result<i64, CoreError>

Latest ADL time.
Source§

fn validate_adl( &self, oracle: &Oracle, is_long: bool, max_staleness: u64, ) -> Result<(), CoreError>

Validate if the ADL can be executed.
Source§

fn update_adl_state( &mut self, oracle: &Oracle, is_long: bool, ) -> Result<(), Error>

Source§

impl AsRef<Market> for Market

Source§

fn as_ref(&self) -> &Market

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl AsRef<Market> for RevertibleMarket<'_, '_>

Source§

fn as_ref(&self) -> &Market

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl BaseMarket<gmsol_store::::states::market::model::{impl#0}::{constant#0}> for Market

Source§

type Num = u128

Unsigned number type used in the market.
Source§

type Signed = i128

Signed number type used in the market.
Source§

type Pool = Pool

Pool type.
Source§

fn liquidity_pool( &self, ) -> Result<&<Market as BaseMarket<gmsol_store::::states::market::model::{impl#0}::{constant#0}>>::Pool, Error>

Get the liquidity pool.
Source§

fn claimable_fee_pool( &self, ) -> Result<&<Market as BaseMarket<gmsol_store::::states::market::model::{impl#0}::{constant#0}>>::Pool, Error>

Get the claimable fee pool.
Source§

fn swap_impact_pool( &self, ) -> Result<&<Market as BaseMarket<gmsol_store::::states::market::model::{impl#0}::{constant#0}>>::Pool, Error>

Get the swap impact pool.
Source§

fn open_interest_pool( &self, is_long: bool, ) -> Result<&<Market as BaseMarket<gmsol_store::::states::market::model::{impl#0}::{constant#0}>>::Pool, Error>

Get the open interest pool.
Source§

fn open_interest_in_tokens_pool( &self, is_long: bool, ) -> Result<&<Market as BaseMarket<gmsol_store::::states::market::model::{impl#0}::{constant#0}>>::Pool, Error>

Get the open interest in (index) tokens pool.
Source§

fn collateral_sum_pool( &self, is_long: bool, ) -> Result<&<Market as BaseMarket<gmsol_store::::states::market::model::{impl#0}::{constant#0}>>::Pool, Error>

Get collateral sum pool.
Source§

fn usd_to_amount_divisor( &self, ) -> <Market as BaseMarket<gmsol_store::::states::market::model::{impl#0}::{constant#0}>>::Num

USD value to market token amount divisor. Read more
Source§

fn max_pool_amount( &self, is_long_token: bool, ) -> Result<<Market as BaseMarket<gmsol_store::::states::market::model::{impl#0}::{constant#0}>>::Num, Error>

Get max pool amount.
Source§

fn pnl_factor_config( &self, kind: PnlFactorKind, is_long: bool, ) -> Result<<Market as BaseMarket<gmsol_store::::states::market::model::{impl#0}::{constant#0}>>::Num, Error>

Get pnl factor config.
Source§

fn reserve_factor( &self, ) -> Result<<Market as BaseMarket<gmsol_store::::states::market::model::{impl#0}::{constant#0}>>::Num, Error>

Get reserve factor.
Source§

fn open_interest_reserve_factor( &self, ) -> Result<<Market as BaseMarket<gmsol_store::::states::market::model::{impl#0}::{constant#0}>>::Num, Error>

Get open interest reserve factor.
Source§

fn max_open_interest( &self, is_long: bool, ) -> Result<<Market as BaseMarket<gmsol_store::::states::market::model::{impl#0}::{constant#0}>>::Num, Error>

Get max open interest.
Source§

fn ignore_open_interest_for_usage_factor(&self) -> Result<bool, Error>

Returns whether ignore open interest for usage factor.
Source§

impl BorrowingFeeMarket<gmsol_store::::states::market::model::{impl#3}::{constant#0}> for Market

Source§

fn borrowing_factor_pool( &self, ) -> Result<&<Market as BaseMarket<gmsol_store::::states::market::model::{impl#3}::{constant#0}>>::Pool, Error>

Get borrowing factor pool.
Source§

fn total_borrowing_pool( &self, ) -> Result<&<Market as BaseMarket<gmsol_store::::states::market::model::{impl#3}::{constant#0}>>::Pool, Error>

Get total borrowing pool.
Source§

fn borrowing_fee_params( &self, ) -> Result<BorrowingFeeParams<<Market as BaseMarket<gmsol_store::::states::market::model::{impl#3}::{constant#0}>>::Num>, Error>

Get borrowing fee params.
Source§

fn passed_in_seconds_for_borrowing(&self) -> Result<u64, Error>

Get the passed time in seconds for the given kind of clock.
Source§

fn borrowing_fee_kink_model_params( &self, ) -> Result<BorrowingFeeKinkModelParams<<Market as BaseMarket<gmsol_store::::states::market::model::{impl#3}::{constant#0}>>::Num>, Error>

Get borrowing fee kink model params.
Source§

impl Bump for Market

Source§

fn seed(&self) -> u8

Source§

impl Clone for Market

Source§

fn clone(&self) -> Market

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

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

Performs copy-assignment from source. Read more
Source§

impl Debug for Market

Source§

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

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

impl Decode for Market

Source§

fn decode<D>(decoder: D) -> Result<Market, DecodeError>
where D: Decoder,

Decode with the given Decoder.
Source§

impl Default for Market

Source§

fn default() -> Market

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

impl<'de> Deserialize<'de> for Market

Source§

fn deserialize<__D>( __deserializer: __D, ) -> Result<Market, <__D as Deserializer<'de>>::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Discriminator for Market

Source§

impl HasMarketMeta for Market

Source§

impl InitSpace for Market

Source§

const INIT_SPACE: usize = 9_168usize

Init Space.
Source§

impl Owner for Market

Source§

fn owner() -> Pubkey

Source§

impl PerpMarket<gmsol_store::::states::market::model::{impl#4}::{constant#0}> for Market

Source§

fn funding_factor_per_second( &self, ) -> &<Market as BaseMarket<gmsol_store::::states::market::model::{impl#4}::{constant#0}>>::Signed

Get funding factor per second.
Source§

fn funding_amount_per_size_pool( &self, is_long: bool, ) -> Result<&<Market as BaseMarket<gmsol_store::::states::market::model::{impl#4}::{constant#0}>>::Pool, Error>

Get funding amount per size pool.
Source§

fn claimable_funding_amount_per_size_pool( &self, is_long: bool, ) -> Result<&<Market as BaseMarket<gmsol_store::::states::market::model::{impl#4}::{constant#0}>>::Pool, Error>

Get claimable funding amount per size pool.
Source§

fn funding_amount_per_size_adjustment( &self, ) -> <Market as BaseMarket<gmsol_store::::states::market::model::{impl#4}::{constant#0}>>::Num

Adjustment factor for packing funding amount per size.
Source§

fn funding_fee_params( &self, ) -> Result<FundingFeeParams<<Market as BaseMarket<gmsol_store::::states::market::model::{impl#4}::{constant#0}>>::Num>, Error>

Get funding fee params.
Source§

fn position_params( &self, ) -> Result<PositionParams<<Market as BaseMarket<gmsol_store::::states::market::model::{impl#4}::{constant#0}>>::Num>, Error>

Get basic position params.
Source§

fn order_fee_params( &self, ) -> Result<FeeParams<<Market as BaseMarket<gmsol_store::::states::market::model::{impl#4}::{constant#0}>>::Num>, Error>

Get the order fee params.
Source§

fn min_collateral_factor_for_open_interest_multiplier( &self, is_long: bool, ) -> Result<<Market as BaseMarket<gmsol_store::::states::market::model::{impl#4}::{constant#0}>>::Num, Error>

Get min collateral factor for open interest multiplier.
Source§

fn liquidation_fee_params( &self, ) -> Result<LiquidationFeeParams<<Market as BaseMarket<gmsol_store::::states::market::model::{impl#4}::{constant#0}>>::Num>, Error>

Get liquidation fee params.
Source§

impl PositionImpactMarket<gmsol_store::::states::market::model::{impl#2}::{constant#0}> for Market

Source§

fn position_impact_pool( &self, ) -> Result<&<Market as BaseMarket<gmsol_store::::states::market::model::{impl#2}::{constant#0}>>::Pool, Error>

Get position impact pool.
Source§

fn position_impact_params( &self, ) -> Result<PriceImpactParams<<Market as BaseMarket<gmsol_store::::states::market::model::{impl#2}::{constant#0}>>::Num>, Error>

Get the position impact params.
Source§

fn position_impact_distribution_params( &self, ) -> Result<PositionImpactDistributionParams<<Market as BaseMarket<gmsol_store::::states::market::model::{impl#2}::{constant#0}>>::Num>, Error>

Get position impact distribution params.
Source§

fn passed_in_seconds_for_position_impact_distribution( &self, ) -> Result<u64, Error>

Get the passed time in seconds for the given kind of clock.
Source§

impl Seed for Market

Source§

const SEED: &'static [u8] = b"market"

Prefix seed for program derived addresses.
Source§

impl Serialize for Market

Source§

fn serialize<__S>( &self, __serializer: __S, ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl SwapMarket<gmsol_store::::states::market::model::{impl#1}::{constant#0}> for Market

Source§

fn swap_impact_params( &self, ) -> Result<PriceImpactParams<<Market as BaseMarket<gmsol_store::::states::market::model::{impl#1}::{constant#0}>>::Num>, Error>

Get swap impact params.
Source§

fn swap_fee_params( &self, ) -> Result<FeeParams<<Market as BaseMarket<gmsol_store::::states::market::model::{impl#1}::{constant#0}>>::Num>, Error>

Get the swap fee params.
Source§

impl Zeroable for Market

§

fn zeroed() -> Self

Source§

impl Copy for Market

Source§

impl Pod for Market

Source§

impl ZeroCopy for Market

Auto Trait Implementations§

§

impl Freeze for Market

§

impl RefUnwindSafe for Market

§

impl Send for Market

§

impl Sync for Market

§

impl Unpin for Market

§

impl UnwindSafe for Market

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
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( self, class: Class, constructed: bool, tag: u32, ) -> TaggedParser<'a, Implicit, Self, E>

Source§

impl<M, const DECIMALS: u8> BaseMarketExt<DECIMALS> for M
where M: BaseMarket<DECIMALS> + ?Sized,

Source§

fn pool_value_without_pnl_for_one_side( &self, prices: &Prices<Self::Num>, is_long: bool, maximize: bool, ) -> Result<Self::Num, Error>

Get the usd value of primary pool without pnl for one side.
Source§

fn open_interest(&self) -> Result<Merged<&Self::Pool, &Self::Pool>, Error>

Get total open interest as a Balance.
Source§

fn open_interest_in_tokens( &self, ) -> Result<Merged<&Self::Pool, &Self::Pool>, Error>

Get total open interest in tokens as a merged Balance. Read more
Source§

fn pnl( &self, index_token_price: &Price<Self::Num>, is_long: bool, maximize: bool, ) -> Result<Self::Signed, Error>

Get total pnl of the market for one side.
Source§

fn pnl_factor_with_pool_value( &self, prices: &Prices<Self::Num>, is_long: bool, maximize: bool, ) -> Result<(Self::Signed, Self::Num), Error>

Get pnl factor with pool value.
Source§

fn pnl_factor( &self, prices: &Prices<Self::Num>, is_long: bool, maximize: bool, ) -> Result<Self::Signed, Error>

Get pnl factor.
Source§

fn validate_pool_amount(&self, is_long_token: bool) -> Result<(), Error>

Validate (primary) pool amount.
Source§

fn pnl_factor_exceeded( &self, prices: &Prices<Self::Num>, kind: PnlFactorKind, is_long: bool, ) -> Result<Option<PnlFactorExceeded<Self::Num>>, Error>

Get the excess of pending pnl. Read more
Source§

fn validate_pnl_factor( &self, prices: &Prices<Self::Num>, kind: PnlFactorKind, is_long: bool, ) -> Result<(), Error>

Validate pnl factor.
Source§

fn validate_max_pnl( &self, prices: &Prices<Self::Num>, long_kind: PnlFactorKind, short_kind: PnlFactorKind, ) -> Result<(), Error>

Validate max pnl.
Source§

fn reserved_value( &self, index_token_price: &Price<Self::Num>, is_long: bool, ) -> Result<Self::Num, Error>

Get reserved value.
Source§

fn validate_reserve( &self, prices: &Prices<Self::Num>, is_long: bool, ) -> Result<(), Error>

Validate reserve.
Source§

fn expected_min_token_balance_excluding_collateral_amount_for_one_token_side( &self, is_long_side: bool, ) -> Result<Self::Num, Error>

Expected min token balance excluding collateral amount. Read more
Source§

fn total_collateral_amount_for_one_token_side( &self, is_long_side: bool, ) -> Result<Self::Num, Error>

Get total collateral amount for one token side. 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<M, const DECIMALS: u8> BorrowingFeeMarketExt<DECIMALS> for M
where M: BorrowingFeeMarket<DECIMALS> + ?Sized,

Source§

fn cumulative_borrowing_factor(&self, is_long: bool) -> Result<Self::Num, Error>

Get current borrowing factor.
Source§

fn borrowing_factor_per_second( &self, is_long: bool, prices: &Prices<Self::Num>, ) -> Result<Self::Num, Error>

Get borrowing factor per second.
Source§

fn next_cumulative_borrowing_factor( &self, is_long: bool, prices: &Prices<Self::Num>, duration_in_second: u64, ) -> Result<(Self::Num, Self::Num), Error>

Get next cumulative borrowing factor of the given side.
Source§

fn total_pending_borrowing_fees( &self, prices: &Prices<Self::Num>, is_long: bool, ) -> Result<Self::Num, Error>

Get total pending borrowing fees.
§

impl<T> CheckedBitPattern for T
where T: AnyBitPattern,

§

type Bits = T

Self must have the same layout as the specified Bits except for the possible invalid bit patterns being checked during is_valid_bit_pattern.
§

fn is_valid_bit_pattern(_bits: &T) -> bool

If this function returns true, then it must be valid to reinterpret bits as &Self.
Source§

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

Source§

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

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

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

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<M, const DECIMALS: u8> PerpMarketExt<DECIMALS> for M
where M: PerpMarket<DECIMALS>,

Source§

fn funding_fee_amount_per_size( &self, is_long: bool, is_long_collateral: bool, ) -> Result<Self::Num, Error>

Get current funding fee amount per size.
Source§

fn claimable_funding_fee_amount_per_size( &self, is_long: bool, is_long_collateral: bool, ) -> Result<Self::Num, Error>

Get current claimable funding fee amount per size.
Source§

fn validate_open_interest_reserve( &self, prices: &Prices<Self::Num>, is_long: bool, ) -> Result<(), Error>

Validate open interest reserve.
Source§

fn min_collateral_factor_for_open_interest( &self, delta: &Self::Signed, is_long: bool, ) -> Result<Self::Num, Error>

Get min collateral factor for open interest.
Source§

fn cap_positive_position_price_impact( &self, index_token_price: &Price<Self::Num>, size_delta_usd: &Self::Signed, impact: &mut Self::Signed, ) -> Result<(), Error>

Caps positive position price impact in-place. If impact is not positive, the function does nothing.
Source§

fn cap_negative_position_price_impact( &self, size_delta_usd: &Self::Signed, for_liquidations: bool, impact: &mut Self::Signed, ) -> Result<Self::Num, Error>

Caps negative position price impact in-place. If impact is not negative, the function does nothing. Read more
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<M, const DECIMALS: u8> PositionImpactMarketExt<DECIMALS> for M
where M: PositionImpactMarket<DECIMALS> + ?Sized,

Source§

fn position_impact_pool_amount(&self) -> Result<Self::Num, Error>

Get position impact pool amount.
Source§

fn pending_position_impact_pool_distribution_amount( &self, duration_in_secs: u64, ) -> Result<(Self::Num, Self::Num), Error>

Get pending position impact pool distribution amount.
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<M, const DECIMALS: u8> SwapMarketExt<DECIMALS> for M
where M: SwapMarket<DECIMALS> + ?Sized,

Source§

fn swap_impact_amount_with_cap( &self, is_long_token: bool, price: &Price<Self::Num>, usd_impact: &Self::Signed, ) -> Result<(Self::Signed, Self::Num), Error>

Get the swap impact amount with cap.
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.
§

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

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

impl<T> AnyBitPattern for T
where T: Pod,

Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

§

impl<T> ErasedDestructor for T
where T: 'static,

§

impl<T> MaybeSendSync for T

§

impl<T> NoUninit for T
where T: Pod,