Skip to main content

MoveAbort

Enum MoveAbort 

Source
#[repr(u64)]
pub enum MoveAbort {
Show 75 variants DepositOrWithdrawAmountZero = 0, SizeOrPositionZero = 1, BadIndexPrice = 2, InvalidPrice = 3, OrderUsdValueTooLow = 4, InvalidForceCancelIds = 5, LiquidateNotFirstOperation = 6, InvalidCancelOrderIds = 7, StopOrderTicketExpired = 8, StopOrderConditionsViolated = 9, WrongOrderDetails = 10, InvalidBasePriceFeedStorage = 11, SelfLiquidation = 12, InvalidAccountCap = 13, InvalidIntegratorTakerFee = 14, WrongVersion = 16, EmptySession = 17, MarketAlreadyRegistered = 18, CollateralIsNotRegistered = 19, MarketIsNotRegistered = 20, InvalidCollateralPriceFeedStorage = 21, NegativeFeesAccrued = 22, InvalidExpirationTimestamp = 23, NotEnoughGasForStopOrder = 24, InvalidAccountForStopOrder = 26, InvalidExecutorForStopOrder = 27, MaxOpenInterestSurpassed = 28, MaxOpenInterestPositionPercentSurpassed = 29, NotEnoughCollateralToAllocateForSession = 30, WrongAccountIdForAllocation = 31, IntegratorVaultAlreadyExists = 32, IntegratorVaultDoesNotExist = 33, SizeNotMultipleOfLotSize = 34, PriceNotMultipleOfTickSize = 35, ADLCounterpartiesMismatch = 36, ADLCounterpartyInsufficient = 37, ADLBadDebtPositionNotClosed = 38, ADLWeightsDoNotSumToOne = 39, NoOpenInterestToSocializeBadDebt = 40, BadDebtAboveThreshold = 41, InvalidMarketParameters = 1_000, UpdatingFundingTooEarly = 1_001, ProposalAlreadyExists = 1_002, PrematureProposal = 1_003, InvalidProposalDelay = 1_004, ProposalDoesNotExist = 1_005, NoFeesAccrued = 1_006, InsufficientInsuranceSurplus = 1_007, NoPriceFeedForMarket = 1_008, ProposalAlreadyMatured = 1_009, MarketIsPaused = 1_010, MarketIsNotPaused = 1_011, MarketIsNotClosed = 1_012, MarketIsClosed = 1_013, MaxPendingOrdersExceeded = 2_000, PositionBelowIMR = 2_001, PositionAboveTolerance = 2_002, InitialMarginRequirementViolated = 2_003, PositionAboveMMR = 2_004, PositionBadDebt = 2_005, InsufficientFreeCollateral = 2_006, PositionAlreadyExists = 2_007, DeallocateTargetMrTooLow = 2_008, InvalidPositionIMR = 2_009, InvalidStopOrderType = 2_010, InvalidPositionForSLTP = 2_011, InvalidMapParameters = 3_000, KeyNotExist = 3_001, KeyAlreadyExists = 3_002, DestroyNotEmpty = 3_003, InvalidUserForOrder = 3_004, FlagRequirementsViolated = 3_005, NotEnoughLiquidity = 3_006, MapTooSmall = 3_007, TooManyAssistantsPerAccount = 4_000,
}

Variants§

§

DepositOrWithdrawAmountZero = 0

Cannot deposit/withdraw zero coins to/from the account’s collateral.

§

SizeOrPositionZero = 1

Size to place is 0. Raised also when there is no open position and an order with reduce_only is passed.

§

BadIndexPrice = 2

Index price returned from oracle is 0 or invalid value

§

InvalidPrice = 3

Price is either 0 or greater than 0x8000_0000_0000_0000

§

OrderUsdValueTooLow = 4

Order value in USD is too low

§

InvalidForceCancelIds = 5

Passed a vector of invalid order ids to perform force cancellation during liquidation

§

LiquidateNotFirstOperation = 6

Liquidate must be the first operation of the session, if performed.

§

InvalidCancelOrderIds = 7

Passed a vector of invalid order ids to cancel

§

StopOrderTicketExpired = 8

Ticket has already passed expire_timestamp and can only be cancelled

§

StopOrderConditionsViolated = 9

Index price is not at correct value to satisfy stop order conditions

§

WrongOrderDetails = 10

Index price is not at correct value to satisfy stop order conditions

§

InvalidBasePriceFeedStorage = 11

Invalid base price feed storage for the clearing house

§

SelfLiquidation = 12

Same liquidator and liqee account ids

§

InvalidAccountCap = 13

User trying to access the account used the wrong account cap

§

InvalidIntegratorTakerFee = 14

Raised when passing an integrator taker fee that is greater than the max_integrator_taker_fee set by the user in its account

§

WrongVersion = 16

Raised when trying to call a function with the wrong package’s version

§

EmptySession = 17

Raised when trying to have a session composed by only start_session and end_session

§

MarketAlreadyRegistered = 18

Market already registered in the registry

§

CollateralIsNotRegistered = 19

Collateral is not registered in the registry

§

MarketIsNotRegistered = 20

Market is not registered in the registry

§

InvalidCollateralPriceFeedStorage = 21

Invalid collateral price feed storage for the clearing house

§

NegativeFeesAccrued = 22

Fees accrued are negative

§

InvalidExpirationTimestamp = 23

Passed a timestamp older than current Clock’s one

§

NotEnoughGasForStopOrder = 24

Stop order gas cost provided is not enough

§

InvalidAccountForStopOrder = 26

Invalid account trying to perform an action on a StopOrderTicket

§

InvalidExecutorForStopOrder = 27

Invalid executor trying to execute the StopOrderTicket

§

MaxOpenInterestSurpassed = 28

Raised when the market’s max open interest is surpassed as a result of the session’s actions

§

MaxOpenInterestPositionPercentSurpassed = 29

Raised when a position’s would get a base amount higher than the allowed percentage of open interest

§

NotEnoughCollateralToAllocateForSession = 30

Raised processing a session that requires a collateral allocation, but not enough collateral is available in the account

§

WrongAccountIdForAllocation = 31

Raised processing a session that requires a collateral allocation and a wrong account is being used to fund it

§

IntegratorVaultAlreadyExists = 32

Raised when trying to create an integrator vault for an address that already has one

§

IntegratorVaultDoesNotExist = 33

Raised when trying to access an integrator vault that does not exist

§

SizeNotMultipleOfLotSize = 34

Raised when trying to place an order passing a size that is not a multiple of market’s lot size

§

PriceNotMultipleOfTickSize = 35

Raised when trying to place an order passing a price that is not a multiple of market’s tick size

§

ADLCounterpartiesMismatch = 36

Raised when adl counterparties vec lengths differ

§

ADLCounterpartyInsufficient = 37

Raised when adl counterparty cannot reduce its assigned portion of base

§

ADLBadDebtPositionNotClosed = 38

Raised when adl does not fully close the bad debt position

§

ADLWeightsDoNotSumToOne = 39

Raised when weights for adl do not sum to fixed point 1

§

NoOpenInterestToSocializeBadDebt = 40

Open interest is 0 when trying to socialize bad debt

§

BadDebtAboveThreshold = 41

Bad debt amount is greater than max allowed threshold

§

InvalidMarketParameters = 1_000

While creating ordered map with invalid parameters, or changing them improperly for an existent map.

§

UpdatingFundingTooEarly = 1_001

Tried to call update_funding before enough time has passed since the last update.

§

ProposalAlreadyExists = 1_002

Margin ratio update proposal already exists for market

§

PrematureProposal = 1_003

Margin ratio update proposal cannot be commited too early

§

InvalidProposalDelay = 1_004

Margin ratio update proposal delay is outside the valid range

§

ProposalDoesNotExist = 1_005

Margin ratio update proposal does not exist for market

§

NoFeesAccrued = 1_006

Exchange has no available fees to withdraw

§

InsufficientInsuranceSurplus = 1_007

Tried to withdraw more insurance funds than the allowed amount

§

NoPriceFeedForMarket = 1_008

Cannot create a market for which a price feed does not exist

§

ProposalAlreadyMatured = 1_009

Cannot delete a proposal that already matured. It can only be committed.

§

MarketIsPaused = 1_010

Raised when an operation is performed while the market is paused

§

MarketIsNotPaused = 1_011

Raised when trying to call close_position_at_settlement_prices while the market is not paused

§

MarketIsNotClosed = 1_012

Raised when trying to call close_position_at_settlement_prices while before close_market has been called by admin

§

MarketIsClosed = 1_013

Raised when Admin tries to resume a closed market

§

MaxPendingOrdersExceeded = 2_000

Tried placing a new pending order when the position already has the maximum allowed number of pending orders.

§

PositionBelowIMR = 2_001

Used for checking both liqee and liqor positions during liquidation

§

PositionAboveTolerance = 2_002

When leaving liqee’s position with a margin ratio above tolerance, meaning that liqor has overbought position

§

InitialMarginRequirementViolated = 2_003

An operation brought an account below initial margin requirements.

§

PositionAboveMMR = 2_004

Position is above MMR, so can’t be liquidated.

§

PositionBadDebt = 2_005

Cannot realize bad debt via means other than calling ‘liquidate’.

§

InsufficientFreeCollateral = 2_006

Cannot withdraw more than the account’s free collateral.

§

PositionAlreadyExists = 2_007

Cannot have more than 1 position in a market.

§

DeallocateTargetMrTooLow = 2_008

Cannot compute deallocate amount for a target MR < IMR.

§

InvalidPositionIMR = 2_009

Raised when trying to set a position’s IMR lower than market’s IMR or higher than 1

§

InvalidStopOrderType = 2_010

Invalid stop order type

§

InvalidPositionForSLTP = 2_011

Invalid position’ status for placing a SLTP order

§

InvalidMapParameters = 3_000

While creating ordered map with wrong parameters.

§

KeyNotExist = 3_001

While searching for a key, but it doesn’t exist.

§

KeyAlreadyExists = 3_002

While inserting already existing key.

§

DestroyNotEmpty = 3_003

When attempting to destroy a non-empty map

§

InvalidUserForOrder = 3_004

Invalid user tries to modify an order

§

FlagRequirementsViolated = 3_005

Orderbook flag requirements violated

§

NotEnoughLiquidity = 3_006

Minimum size matched not reached

§

MapTooSmall = 3_007

When trying to change a map configuration, but the map has length less than 4

§

TooManyAssistantsPerAccount = 4_000

When trying to create another AccountCap<ASSISTANT> for an Account that already has constants::MAX_ASSISTANTS_PER_ACCOUNT active assistants.

Implementations§

Source§

impl MoveAbort

Source

pub const fn is_deposit_or_withdraw_amount_zero(&self) -> bool

Returns true if the enum is MoveAbort::DepositOrWithdrawAmountZero otherwise false

Source

pub const fn is_size_or_position_zero(&self) -> bool

Returns true if the enum is MoveAbort::SizeOrPositionZero otherwise false

Source

pub const fn is_bad_index_price(&self) -> bool

Returns true if the enum is MoveAbort::BadIndexPrice otherwise false

Source

pub const fn is_invalid_price(&self) -> bool

Returns true if the enum is MoveAbort::InvalidPrice otherwise false

Source

pub const fn is_order_usd_value_too_low(&self) -> bool

Returns true if the enum is MoveAbort::OrderUsdValueTooLow otherwise false

Source

pub const fn is_invalid_force_cancel_ids(&self) -> bool

Returns true if the enum is MoveAbort::InvalidForceCancelIds otherwise false

Source

pub const fn is_liquidate_not_first_operation(&self) -> bool

Returns true if the enum is MoveAbort::LiquidateNotFirstOperation otherwise false

Source

pub const fn is_invalid_cancel_order_ids(&self) -> bool

Returns true if the enum is MoveAbort::InvalidCancelOrderIds otherwise false

Source

pub const fn is_stop_order_ticket_expired(&self) -> bool

Returns true if the enum is MoveAbort::StopOrderTicketExpired otherwise false

Source

pub const fn is_stop_order_conditions_violated(&self) -> bool

Returns true if the enum is MoveAbort::StopOrderConditionsViolated otherwise false

Source

pub const fn is_wrong_order_details(&self) -> bool

Returns true if the enum is MoveAbort::WrongOrderDetails otherwise false

Source

pub const fn is_invalid_base_price_feed_storage(&self) -> bool

Returns true if the enum is MoveAbort::InvalidBasePriceFeedStorage otherwise false

Source

pub const fn is_self_liquidation(&self) -> bool

Returns true if the enum is MoveAbort::SelfLiquidation otherwise false

Source

pub const fn is_invalid_account_cap(&self) -> bool

Returns true if the enum is MoveAbort::InvalidAccountCap otherwise false

Source

pub const fn is_invalid_integrator_taker_fee(&self) -> bool

Returns true if the enum is MoveAbort::InvalidIntegratorTakerFee otherwise false

Source

pub const fn is_wrong_version(&self) -> bool

Returns true if the enum is MoveAbort::WrongVersion otherwise false

Source

pub const fn is_empty_session(&self) -> bool

Returns true if the enum is MoveAbort::EmptySession otherwise false

Source

pub const fn is_market_already_registered(&self) -> bool

Returns true if the enum is MoveAbort::MarketAlreadyRegistered otherwise false

Source

pub const fn is_collateral_is_not_registered(&self) -> bool

Returns true if the enum is MoveAbort::CollateralIsNotRegistered otherwise false

Source

pub const fn is_market_is_not_registered(&self) -> bool

Returns true if the enum is MoveAbort::MarketIsNotRegistered otherwise false

Source

pub const fn is_invalid_collateral_price_feed_storage(&self) -> bool

Returns true if the enum is MoveAbort::InvalidCollateralPriceFeedStorage otherwise false

Source

pub const fn is_negative_fees_accrued(&self) -> bool

Returns true if the enum is MoveAbort::NegativeFeesAccrued otherwise false

Source

pub const fn is_invalid_expiration_timestamp(&self) -> bool

Returns true if the enum is MoveAbort::InvalidExpirationTimestamp otherwise false

Source

pub const fn is_not_enough_gas_for_stop_order(&self) -> bool

Returns true if the enum is MoveAbort::NotEnoughGasForStopOrder otherwise false

Source

pub const fn is_invalid_account_for_stop_order(&self) -> bool

Returns true if the enum is MoveAbort::InvalidAccountForStopOrder otherwise false

Source

pub const fn is_invalid_executor_for_stop_order(&self) -> bool

Returns true if the enum is MoveAbort::InvalidExecutorForStopOrder otherwise false

Source

pub const fn is_max_open_interest_surpassed(&self) -> bool

Returns true if the enum is MoveAbort::MaxOpenInterestSurpassed otherwise false

Source

pub const fn is_max_open_interest_position_percent_surpassed(&self) -> bool

Source

pub const fn is_not_enough_collateral_to_allocate_for_session(&self) -> bool

Source

pub const fn is_wrong_account_id_for_allocation(&self) -> bool

Returns true if the enum is MoveAbort::WrongAccountIdForAllocation otherwise false

Source

pub const fn is_integrator_vault_already_exists(&self) -> bool

Returns true if the enum is MoveAbort::IntegratorVaultAlreadyExists otherwise false

Source

pub const fn is_integrator_vault_does_not_exist(&self) -> bool

Returns true if the enum is MoveAbort::IntegratorVaultDoesNotExist otherwise false

Source

pub const fn is_size_not_multiple_of_lot_size(&self) -> bool

Returns true if the enum is MoveAbort::SizeNotMultipleOfLotSize otherwise false

Source

pub const fn is_price_not_multiple_of_tick_size(&self) -> bool

Returns true if the enum is MoveAbort::PriceNotMultipleOfTickSize otherwise false

Source

pub const fn is_adl_counterparties_mismatch(&self) -> bool

Returns true if the enum is MoveAbort::ADLCounterpartiesMismatch otherwise false

Source

pub const fn is_adl_counterparty_insufficient(&self) -> bool

Returns true if the enum is MoveAbort::ADLCounterpartyInsufficient otherwise false

Source

pub const fn is_adl_bad_debt_position_not_closed(&self) -> bool

Returns true if the enum is MoveAbort::ADLBadDebtPositionNotClosed otherwise false

Source

pub const fn is_adl_weights_do_not_sum_to_one(&self) -> bool

Returns true if the enum is MoveAbort::ADLWeightsDoNotSumToOne otherwise false

Source

pub const fn is_no_open_interest_to_socialize_bad_debt(&self) -> bool

Returns true if the enum is MoveAbort::NoOpenInterestToSocializeBadDebt otherwise false

Source

pub const fn is_bad_debt_above_threshold(&self) -> bool

Returns true if the enum is MoveAbort::BadDebtAboveThreshold otherwise false

Source

pub const fn is_invalid_market_parameters(&self) -> bool

Returns true if the enum is MoveAbort::InvalidMarketParameters otherwise false

Source

pub const fn is_updating_funding_too_early(&self) -> bool

Returns true if the enum is MoveAbort::UpdatingFundingTooEarly otherwise false

Source

pub const fn is_proposal_already_exists(&self) -> bool

Returns true if the enum is MoveAbort::ProposalAlreadyExists otherwise false

Source

pub const fn is_premature_proposal(&self) -> bool

Returns true if the enum is MoveAbort::PrematureProposal otherwise false

Source

pub const fn is_invalid_proposal_delay(&self) -> bool

Returns true if the enum is MoveAbort::InvalidProposalDelay otherwise false

Source

pub const fn is_proposal_does_not_exist(&self) -> bool

Returns true if the enum is MoveAbort::ProposalDoesNotExist otherwise false

Source

pub const fn is_no_fees_accrued(&self) -> bool

Returns true if the enum is MoveAbort::NoFeesAccrued otherwise false

Source

pub const fn is_insufficient_insurance_surplus(&self) -> bool

Returns true if the enum is MoveAbort::InsufficientInsuranceSurplus otherwise false

Source

pub const fn is_no_price_feed_for_market(&self) -> bool

Returns true if the enum is MoveAbort::NoPriceFeedForMarket otherwise false

Source

pub const fn is_proposal_already_matured(&self) -> bool

Returns true if the enum is MoveAbort::ProposalAlreadyMatured otherwise false

Source

pub const fn is_market_is_paused(&self) -> bool

Returns true if the enum is MoveAbort::MarketIsPaused otherwise false

Source

pub const fn is_market_is_not_paused(&self) -> bool

Returns true if the enum is MoveAbort::MarketIsNotPaused otherwise false

Source

pub const fn is_market_is_not_closed(&self) -> bool

Returns true if the enum is MoveAbort::MarketIsNotClosed otherwise false

Source

pub const fn is_market_is_closed(&self) -> bool

Returns true if the enum is MoveAbort::MarketIsClosed otherwise false

Source

pub const fn is_max_pending_orders_exceeded(&self) -> bool

Returns true if the enum is MoveAbort::MaxPendingOrdersExceeded otherwise false

Source

pub const fn is_position_below_imr(&self) -> bool

Returns true if the enum is MoveAbort::PositionBelowIMR otherwise false

Source

pub const fn is_position_above_tolerance(&self) -> bool

Returns true if the enum is MoveAbort::PositionAboveTolerance otherwise false

Source

pub const fn is_initial_margin_requirement_violated(&self) -> bool

Returns true if the enum is MoveAbort::InitialMarginRequirementViolated otherwise false

Source

pub const fn is_position_above_mmr(&self) -> bool

Returns true if the enum is MoveAbort::PositionAboveMMR otherwise false

Source

pub const fn is_position_bad_debt(&self) -> bool

Returns true if the enum is MoveAbort::PositionBadDebt otherwise false

Source

pub const fn is_insufficient_free_collateral(&self) -> bool

Returns true if the enum is MoveAbort::InsufficientFreeCollateral otherwise false

Source

pub const fn is_position_already_exists(&self) -> bool

Returns true if the enum is MoveAbort::PositionAlreadyExists otherwise false

Source

pub const fn is_deallocate_target_mr_too_low(&self) -> bool

Returns true if the enum is MoveAbort::DeallocateTargetMrTooLow otherwise false

Source

pub const fn is_invalid_position_imr(&self) -> bool

Returns true if the enum is MoveAbort::InvalidPositionIMR otherwise false

Source

pub const fn is_invalid_stop_order_type(&self) -> bool

Returns true if the enum is MoveAbort::InvalidStopOrderType otherwise false

Source

pub const fn is_invalid_position_for_sltp(&self) -> bool

Returns true if the enum is MoveAbort::InvalidPositionForSLTP otherwise false

Source

pub const fn is_invalid_map_parameters(&self) -> bool

Returns true if the enum is MoveAbort::InvalidMapParameters otherwise false

Source

pub const fn is_key_not_exist(&self) -> bool

Returns true if the enum is MoveAbort::KeyNotExist otherwise false

Source

pub const fn is_key_already_exists(&self) -> bool

Returns true if the enum is MoveAbort::KeyAlreadyExists otherwise false

Source

pub const fn is_destroy_not_empty(&self) -> bool

Returns true if the enum is MoveAbort::DestroyNotEmpty otherwise false

Source

pub const fn is_invalid_user_for_order(&self) -> bool

Returns true if the enum is MoveAbort::InvalidUserForOrder otherwise false

Source

pub const fn is_flag_requirements_violated(&self) -> bool

Returns true if the enum is MoveAbort::FlagRequirementsViolated otherwise false

Source

pub const fn is_not_enough_liquidity(&self) -> bool

Returns true if the enum is MoveAbort::NotEnoughLiquidity otherwise false

Source

pub const fn is_map_too_small(&self) -> bool

Returns true if the enum is MoveAbort::MapTooSmall otherwise false

Source

pub const fn is_too_many_assistants_per_account(&self) -> bool

Returns true if the enum is MoveAbort::TooManyAssistantsPerAccount otherwise false

Trait Implementations§

Source§

impl Debug for MoveAbort

Source§

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

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

impl Display for MoveAbort

Source§

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

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

impl EnumMessage for MoveAbort

Source§

fn get_message(&self) -> Option<&'static str>

Source§

fn get_detailed_message(&self) -> Option<&'static str>

Source§

fn get_documentation(&self) -> Option<&'static str>

Get the doc comment associated with a variant if it exists.
Source§

fn get_serializations(&self) -> &'static [&'static str]

Source§

impl<'_derivative_strum> From<&'_derivative_strum MoveAbort> for &'static str

Source§

fn from(x: &'_derivative_strum MoveAbort) -> &'static str

Converts to this type from the input type.
Source§

impl From<MoveAbort> for &'static str

Source§

fn from(x: MoveAbort) -> &'static str

Converts to this type from the input type.
Source§

impl From<MoveAbort> for u64

Source§

fn from(enum_value: MoveAbort) -> Self

Converts to this type from the input type.
Source§

impl Hash for MoveAbort

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for MoveAbort

Source§

fn eq(&self, other: &MoveAbort) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl TryFrom<u64> for MoveAbort

Source§

type Error = TryFromPrimitiveError<MoveAbort>

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

fn try_from(number: u64) -> Result<Self, TryFromPrimitiveError<Self>>

Performs the conversion.
Source§

impl TryFromPrimitive for MoveAbort

Source§

impl Eq for MoveAbort

Source§

impl StructuralPartialEq for MoveAbort

Auto Trait Implementations§

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<U> As for U

Source§

fn as_<T>(self) -> T
where T: CastFrom<U>,

Casts self to type T. The semantics of numeric casting with the as operator are followed, so <T as As>::as_::<U> can be used in the same way as T as U for numeric conversions. 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> Conv for T

Source§

fn conv<T>(self) -> T
where Self: Into<T>,

Converts self into T using Into<T>. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

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

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

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<T> Pipe for T
where T: ?Sized,

Source§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> R
where Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
Source§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> R
where R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
Source§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> R
where R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
Source§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
where Self: Borrow<B>, B: 'a + ?Sized, R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
Source§

fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
where Self: BorrowMut<B>, B: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe function. Read more
Source§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
where Self: AsRef<U>, U: 'a + ?Sized, R: 'a,

Borrows self, then passes self.as_ref() into the pipe function.
Source§

fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
where Self: AsMut<U>, U: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.as_mut() into the pipe function.
Source§

fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
where Self: Deref<Target = T>, T: 'a + ?Sized, R: 'a,

Borrows self, then passes self.deref() into the pipe function.
Source§

fn pipe_deref_mut<'a, T, R>( &'a mut self, func: impl FnOnce(&'a mut T) -> R, ) -> R
where Self: DerefMut<Target = T> + Deref, T: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe function.
Source§

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

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> Tap for T

Source§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
Source§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
Source§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
where Self: Borrow<B>, B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
Source§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
where Self: BorrowMut<B>, B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
Source§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
where Self: AsRef<R>, R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
Source§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
where Self: AsMut<R>, R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
Source§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
where Self: Deref<Target = T>, T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
Source§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
where Self: DerefMut<Target = T> + Deref, T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
Source§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
Source§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release builds.
Source§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
where Self: Borrow<B>, B: ?Sized,

Calls .tap_borrow() only in debug builds, and is erased in release builds.
Source§

fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
where Self: BorrowMut<B>, B: ?Sized,

Calls .tap_borrow_mut() only in debug builds, and is erased in release builds.
Source§

fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
where Self: AsRef<R>, R: ?Sized,

Calls .tap_ref() only in debug builds, and is erased in release builds.
Source§

fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
where Self: AsMut<R>, R: ?Sized,

Calls .tap_ref_mut() only in debug builds, and is erased in release builds.
Source§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
where Self: Deref<Target = T>, T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release builds.
Source§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Self
where Self: DerefMut<Target = T> + Deref, T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release builds.
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T> ToStringFallible for T
where T: Display,

Source§

fn try_to_string(&self) -> Result<String, TryReserveError>

ToString::to_string, but without panic on OOM.

Source§

impl<T> TryConv for T

Source§

fn try_conv<T>(self) -> Result<T, Self::Error>
where Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. 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

Source§

impl<T> WithSubscriber for T

Source§

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

fn with_current_subscriber(self) -> WithDispatch<Self>

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

impl<T> IsFieldType<T> for T