pub struct PositionInfo {
pub terms: OptionTerms,
pub side: TakerSide,
pub flags: u8,
pub flags2: u8,
pub flags3: u8,
pub status: PositionStatus,
pub taker_owner: Pubkey,
pub maker_owner: Pubkey,
pub market_pda: Pubkey,
pub quantity: Quantity,
pub order_id: OrderId,
}Fields§
§terms: OptionTerms§side: TakerSideThe current account layout has no side byte; the current contract only opens sell-side positions.
flags: u8§flags2: u8§flags3: u8§status: PositionStatus§taker_owner: Pubkey§maker_owner: Pubkey§market_pda: Pubkey§quantity: Quantity§order_id: OrderIdImplementations§
Source§impl PositionInfo
impl PositionInfo
pub fn from_account( account: &Account, program_id: &Pubkey, ) -> Result<Self, ChainError>
Trait Implementations§
Source§impl Clone for PositionInfo
impl Clone for PositionInfo
Auto Trait Implementations§
impl Freeze for PositionInfo
impl RefUnwindSafe for PositionInfo
impl Send for PositionInfo
impl Sync for PositionInfo
impl Unpin for PositionInfo
impl UnsafeUnpin for PositionInfo
impl UnwindSafe for PositionInfo
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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