pub struct BidState {Show 23 fields
pub discriminator: [u8; 8],
pub version: u8,
pub bump: [u8; 1],
pub owner: Pubkey,
pub bid_id: Pubkey,
pub target: Target,
pub target_id: Pubkey,
pub field: Option<Field>,
pub field_id: Option<Pubkey>,
pub quantity: u32,
pub filled_quantity: u32,
pub amount: u64,
pub currency: Option<Pubkey>,
pub expiry: i64,
pub private_taker: Option<Pubkey>,
pub maker_broker: Option<Pubkey>,
pub margin: Option<Pubkey>,
pub updated_at: i64,
pub cosigner: NullableAddress,
pub rent_payer: NullableAddress,
pub reserved: [u8; 8],
pub reserved1: [u8; 16],
pub reserved2: [u8; 32],
}Fields§
§discriminator: [u8; 8]§version: u8§bump: [u8; 1]§owner: Pubkey§bid_id: PubkeyRandomly picked pubkey used in bid seeds. To avoid dangling bids can use assetId here.
target: Target§target_id: Pubkey§field: Option<Field>§field_id: Option<Pubkey>§quantity: u32§filled_quantity: u32§amount: u64§currency: Option<Pubkey>§expiry: i64§private_taker: Option<Pubkey>§maker_broker: Option<Pubkey>§margin: Option<Pubkey>§updated_at: i64§cosigner: NullableAddressCosigner Default Pubkey represents a None value.
rent_payer: NullableAddressOwner is the rent payer when this is None. Default Pubkey represents a None value.
reserved: [u8; 8]§reserved1: [u8; 16]§reserved2: [u8; 32]Implementations§
Source§impl BidState
impl BidState
Sourcepub const PREFIX: &'static [u8]
pub const PREFIX: &'static [u8]
Prefix values used to generate a PDA for this account.
Values are positional and appear in the following order:
BidState::PREFIX- owner (
Pubkey) - bid_id (
Pubkey)
pub fn create_pda( owner: Pubkey, bid_id: Pubkey, bump: u8, ) -> Result<Pubkey, PubkeyError>
pub fn find_pda(owner: &Pubkey, bid_id: &Pubkey) -> (Pubkey, u8)
pub fn from_bytes(data: &[u8]) -> Result<Self, Error>
Trait Implementations§
Source§impl BorshDeserialize for BidStatewhere
[u8; 8]: BorshDeserialize,
u8: BorshDeserialize,
[u8; 1]: BorshDeserialize,
Pubkey: BorshDeserialize,
Target: BorshDeserialize,
Option<Field>: BorshDeserialize,
Option<Pubkey>: BorshDeserialize,
u32: BorshDeserialize,
u64: BorshDeserialize,
i64: BorshDeserialize,
NullableAddress: BorshDeserialize,
[u8; 16]: BorshDeserialize,
[u8; 32]: BorshDeserialize,
impl BorshDeserialize for BidStatewhere
[u8; 8]: BorshDeserialize,
u8: BorshDeserialize,
[u8; 1]: BorshDeserialize,
Pubkey: BorshDeserialize,
Target: BorshDeserialize,
Option<Field>: BorshDeserialize,
Option<Pubkey>: BorshDeserialize,
u32: BorshDeserialize,
u64: BorshDeserialize,
i64: BorshDeserialize,
NullableAddress: BorshDeserialize,
[u8; 16]: BorshDeserialize,
[u8; 32]: BorshDeserialize,
fn deserialize_reader<R: Read>(reader: &mut R) -> Result<Self, Error>
Source§fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
Deserializes this instance from a given slice of bytes.
Updates the buffer to point at the remaining bytes.
Source§fn try_from_slice(v: &[u8]) -> Result<Self, Error>
fn try_from_slice(v: &[u8]) -> Result<Self, Error>
Deserialize this instance from a slice of bytes.
fn try_from_reader<R>(reader: &mut R) -> Result<Self, Error>where
R: Read,
Source§impl BorshSerialize for BidStatewhere
[u8; 8]: BorshSerialize,
u8: BorshSerialize,
[u8; 1]: BorshSerialize,
Pubkey: BorshSerialize,
Target: BorshSerialize,
Option<Field>: BorshSerialize,
Option<Pubkey>: BorshSerialize,
u32: BorshSerialize,
u64: BorshSerialize,
i64: BorshSerialize,
NullableAddress: BorshSerialize,
[u8; 16]: BorshSerialize,
[u8; 32]: BorshSerialize,
impl BorshSerialize for BidStatewhere
[u8; 8]: BorshSerialize,
u8: BorshSerialize,
[u8; 1]: BorshSerialize,
Pubkey: BorshSerialize,
Target: BorshSerialize,
Option<Field>: BorshSerialize,
Option<Pubkey>: BorshSerialize,
u32: BorshSerialize,
u64: BorshSerialize,
i64: BorshSerialize,
NullableAddress: BorshSerialize,
[u8; 16]: BorshSerialize,
[u8; 32]: BorshSerialize,
Source§impl<'a> TryFrom<&AccountInfo<'a>> for BidState
impl<'a> TryFrom<&AccountInfo<'a>> for BidState
impl Eq for BidState
impl StructuralPartialEq for BidState
Auto Trait Implementations§
impl Freeze for BidState
impl RefUnwindSafe for BidState
impl Send for BidState
impl Sync for BidState
impl Unpin for BidState
impl UnwindSafe for BidState
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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