Struct jet_fixed_term::orderbook::state::CallbackInfo
source · [−]#[repr(C)]pub struct CallbackInfo {
pub order_tag: OrderTag,
pub owner: Pubkey,
pub fill_account: Pubkey,
pub out_account: Pubkey,
pub adapter_account_key: Pubkey,
pub order_submitted: [u8; 8],
pub flags: CallbackFlags,
/* private fields */
}
Expand description
The CallbackInfo is information about an order that is stored in the Event Queue used to manage order metadata
Fields
order_tag: OrderTag
The order tag is generated by the program when submitting orders to the book
Used to seed and track PDAs such as TermLoan
owner: Pubkey
authority who signed to place the order and is permitted to cancel the order. for margin orders, this is the owner of the MarginUser, which is the margin account PDA from the margin program.
fill_account: Pubkey
the account that will be assigned ownership of any output resulting from a fill. for margin orders this is the margin user. for auto-stake, this account will be set as the split ticket owner. otherwise this is the token account to be deposited into.
out_account: Pubkey
margin user or token account to be deposited into on out the account that will be assigned ownership of any output resulting from an out. for margin orders this is the margin user. otherwise this is the token account to be deposited into.
adapter_account_key: Pubkey
Pubkey of the account that will receive the event information
order_submitted: [u8; 8]
The unix timestamp for the slot that the order entered the aaob
flags: CallbackFlags
configuration used by callback execution
Implementations
sourceimpl CallbackInfo
impl CallbackInfo
pub const LEN: usize = 167usize
pub fn new(
market_key: Pubkey,
owner: Pubkey,
fill_account: Pubkey,
out_account: Pubkey,
adapter: Pubkey,
order_submitted: UnixTimestamp,
flags: CallbackFlags,
nonce: u64
) -> Self
pub fn adapter(&self) -> Option<Pubkey>
pub fn order_submitted_timestamp(&self) -> UnixTimestamp
Trait Implementations
sourceimpl CallbackInfo for CallbackInfo
impl CallbackInfo for CallbackInfo
type CallbackId = Pubkey
type CallbackId = Pubkey
sourcefn as_callback_id(&self) -> &Self::CallbackId
fn as_callback_id(&self) -> &Self::CallbackId
sourceimpl Clone for CallbackInfo
impl Clone for CallbackInfo
sourcefn clone(&self) -> CallbackInfo
fn clone(&self) -> CallbackInfo
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresourceimpl Debug for CallbackInfo
impl Debug for CallbackInfo
sourceimpl Default for CallbackInfo
impl Default for CallbackInfo
sourcefn default() -> CallbackInfo
fn default() -> CallbackInfo
sourceimpl PartialEq<CallbackInfo> for CallbackInfo
impl PartialEq<CallbackInfo> for CallbackInfo
sourcefn eq(&self, other: &CallbackInfo) -> bool
fn eq(&self, other: &CallbackInfo) -> bool
sourceimpl Zeroable for CallbackInfo
impl Zeroable for CallbackInfo
impl Copy for CallbackInfo
impl Eq for CallbackInfo
impl Pod for CallbackInfo
impl StructuralEq for CallbackInfo
impl StructuralPartialEq for CallbackInfo
Auto Trait Implementations
impl RefUnwindSafe for CallbackInfo
impl Send for CallbackInfo
impl Sync for CallbackInfo
impl Unpin for CallbackInfo
impl UnwindSafe for CallbackInfo
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
type Bits = T
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
. Read more