Struct jet_fixed_term::margin::state::MarginUser
source · [−]pub struct MarginUser {
pub version: u8,
pub margin_account: Pubkey,
pub market: Pubkey,
pub claims: Pubkey,
pub collateral: Pubkey,
pub underlying_settlement: Pubkey,
pub ticket_settlement: Pubkey,
pub debt: Debt,
pub assets: Assets,
}
Expand description
An acocunt used to track margin users of the market
Fields
version: u8
used to determine if a migration step is needed before user actions are allowed
margin_account: Pubkey
The margin account used for signing actions
market: Pubkey
The Market
for the market
claims: Pubkey
Token account used by the margin program to track the debt
collateral: Pubkey
Token account used by the margin program to track the collateral value of positions which are internal to fixed-term market, such as SplitTicket, ClaimTicket, and open orders. this does not represent underlying tokens or ticket tokens, those are registered independently in margin
underlying_settlement: Pubkey
The settle
instruction is permissionless, therefore the user must specify upon margin account creation
the address to send owed tokens
ticket_settlement: Pubkey
The settle
instruction is permissionless, therefore the user must specify upon margin account creation
the address to send owed tickets
debt: Debt
The amount of debt that must be collateralized or repaid This debt is expressed in terms of the underlying token - not tickets
assets: Assets
Accounting used to track assets in custody of the fixed term market
Trait Implementations
sourceimpl AccountDeserialize for MarginUser
impl AccountDeserialize for MarginUser
sourcefn try_deserialize(buf: &mut &[u8]) -> Result<Self>
fn try_deserialize(buf: &mut &[u8]) -> Result<Self>
Mint
account into a token
Account
. Read moresourcefn try_deserialize_unchecked(buf: &mut &[u8]) -> Result<Self>
fn try_deserialize_unchecked(buf: &mut &[u8]) -> Result<Self>
sourceimpl AccountSerialize for MarginUser
impl AccountSerialize for MarginUser
sourcefn try_serialize<W: Write>(&self, writer: &mut W) -> Result<()>
fn try_serialize<W: Write>(&self, writer: &mut W) -> Result<()>
writer
.sourceimpl BorshDeserialize for MarginUserwhere
u8: BorshDeserialize,
Pubkey: BorshDeserialize,
Pubkey: BorshDeserialize,
Pubkey: BorshDeserialize,
Pubkey: BorshDeserialize,
Pubkey: BorshDeserialize,
Pubkey: BorshDeserialize,
Debt: BorshDeserialize,
Assets: BorshDeserialize,
impl BorshDeserialize for MarginUserwhere
u8: BorshDeserialize,
Pubkey: BorshDeserialize,
Pubkey: BorshDeserialize,
Pubkey: BorshDeserialize,
Pubkey: BorshDeserialize,
Pubkey: BorshDeserialize,
Pubkey: BorshDeserialize,
Debt: BorshDeserialize,
Assets: BorshDeserialize,
sourcefn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
fn try_from_slice(v: &[u8]) -> Result<Self, Error>
fn try_from_slice(v: &[u8]) -> Result<Self, Error>
sourceimpl BorshSerialize for MarginUserwhere
u8: BorshSerialize,
Pubkey: BorshSerialize,
Pubkey: BorshSerialize,
Pubkey: BorshSerialize,
Pubkey: BorshSerialize,
Pubkey: BorshSerialize,
Pubkey: BorshSerialize,
Debt: BorshSerialize,
Assets: BorshSerialize,
impl BorshSerialize for MarginUserwhere
u8: BorshSerialize,
Pubkey: BorshSerialize,
Pubkey: BorshSerialize,
Pubkey: BorshSerialize,
Pubkey: BorshSerialize,
Pubkey: BorshSerialize,
Pubkey: BorshSerialize,
Debt: BorshSerialize,
Assets: BorshSerialize,
sourceimpl Clone for MarginUser
impl Clone for MarginUser
sourcefn clone(&self) -> MarginUser
fn clone(&self) -> MarginUser
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more