Struct jet_margin::LiquidatorConfig
source · [−]pub struct LiquidatorConfig {
pub airspace: Pubkey,
pub liquidator: Pubkey,
}
Expand description
Configuration for allowed liquidators
Fields
airspace: Pubkey
The airspace this liquidator is being configured to act within
liquidator: Pubkey
The address of the liquidator allowed to act
Implementations
Trait Implementations
sourceimpl AccountDeserialize for LiquidatorConfig
impl AccountDeserialize for LiquidatorConfig
sourcefn try_deserialize(buf: &mut &[u8]) -> Result<Self>
fn try_deserialize(buf: &mut &[u8]) -> Result<Self>
Deserializes previously initialized account data. Should fail for all
uninitialized accounts, where the bytes are zeroed. Implementations
should be unique to a particular account type so that one can never
successfully deserialize the data of one account type into another.
For example, if the SPL token program were to implement this trait,
it should be impossible to deserialize a
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>
Deserializes account data without checking the account discriminator.
This should only be used on account initialization, when the bytes of
the account are zeroed. Read more
sourceimpl AccountSerialize for LiquidatorConfig
impl AccountSerialize for LiquidatorConfig
sourcefn try_serialize<W: Write>(&self, writer: &mut W) -> Result<()>
fn try_serialize<W: Write>(&self, writer: &mut W) -> Result<()>
Serializes the account data into
writer
.sourceimpl BorshDeserialize for LiquidatorConfigwhere
Pubkey: BorshDeserialize,
Pubkey: BorshDeserialize,
impl BorshDeserialize for LiquidatorConfigwhere
Pubkey: BorshDeserialize,
Pubkey: BorshDeserialize,
sourcefn 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. Read more
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.
sourceimpl BorshSerialize for LiquidatorConfigwhere
Pubkey: BorshSerialize,
Pubkey: BorshSerialize,
impl BorshSerialize for LiquidatorConfigwhere
Pubkey: BorshSerialize,
Pubkey: BorshSerialize,
sourceimpl Clone for LiquidatorConfig
impl Clone for LiquidatorConfig
sourcefn clone(&self) -> LiquidatorConfig
fn clone(&self) -> LiquidatorConfig
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for LiquidatorConfig
impl Debug for LiquidatorConfig
sourceimpl Default for LiquidatorConfig
impl Default for LiquidatorConfig
sourcefn default() -> LiquidatorConfig
fn default() -> LiquidatorConfig
Returns the “default value” for a type. Read more
sourceimpl Discriminator for LiquidatorConfig
impl Discriminator for LiquidatorConfig
fn discriminator() -> [u8; 8]
sourceimpl Owner for LiquidatorConfig
impl Owner for LiquidatorConfig
sourceimpl PartialEq<LiquidatorConfig> for LiquidatorConfig
impl PartialEq<LiquidatorConfig> for LiquidatorConfig
sourcefn eq(&self, other: &LiquidatorConfig) -> bool
fn eq(&self, other: &LiquidatorConfig) -> bool
impl Eq for LiquidatorConfig
impl StructuralEq for LiquidatorConfig
impl StructuralPartialEq for LiquidatorConfig
Auto Trait Implementations
impl RefUnwindSafe for LiquidatorConfig
impl Send for LiquidatorConfig
impl Sync for LiquidatorConfig
impl Unpin for LiquidatorConfig
impl UnwindSafe for LiquidatorConfig
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
Mutably borrows from an owned value. Read more