Skip to main content

PositionStateExt

Trait PositionStateExt 

Source
pub trait PositionStateExt<const DECIMALS: u8>: PositionState<DECIMALS> {
    // Provided method
    fn is_empty(&self) -> bool { ... }
}
Expand description

Extension trait for PositionState.

Provided Methods§

Source

fn is_empty(&self) -> bool

Return whether the position is considered to be empty during the decrease position action.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<const DECIMALS: u8, P: PositionState<DECIMALS> + ?Sized> PositionStateExt<DECIMALS> for P