pub struct Factory {
pub base: Pubkey,
pub bump: u8,
pub num_swaps: u64,
pub admin: Pubkey,
pub reserved: [u64; 16],
}Expand description
Keeps track of SwapInfos.
Fields
base: PubkeyBase of the Factory.
bump: u8The bump seed.
num_swaps: u64Total number of swaps that have been created.
admin: PubkeyAdmin of the Factory. Currently unused.
reserved: [u64; 16]Reserved for future program upgrades.
Trait Implementations
sourceimpl AccountDeserialize for Factory
impl AccountDeserialize for Factory
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 more
sourceimpl AccountSerialize for Factory
impl AccountSerialize for Factory
sourceimpl BorshDeserialize for Factory where
Pubkey: BorshDeserialize,
u8: BorshDeserialize,
u64: BorshDeserialize,
Pubkey: BorshDeserialize,
[u64; 16]: BorshDeserialize,
impl BorshDeserialize for Factory where
Pubkey: BorshDeserialize,
u8: BorshDeserialize,
u64: BorshDeserialize,
Pubkey: BorshDeserialize,
[u64; 16]: BorshDeserialize,
sourceimpl BorshSerialize for Factory where
Pubkey: BorshSerialize,
u8: BorshSerialize,
u64: BorshSerialize,
Pubkey: BorshSerialize,
[u64; 16]: BorshSerialize,
impl BorshSerialize for Factory where
Pubkey: BorshSerialize,
u8: BorshSerialize,
u64: BorshSerialize,
Pubkey: BorshSerialize,
[u64; 16]: BorshSerialize,
sourceimpl Discriminator for Factory
impl Discriminator for Factory
fn discriminator() -> [u8; 8]
impl Copy for Factory
impl Eq for Factory
impl StructuralEq for Factory
impl StructuralPartialEq for Factory
Auto Trait Implementations
impl RefUnwindSafe for Factory
impl Send for Factory
impl Sync for Factory
impl Unpin for Factory
impl UnwindSafe for Factory
Blanket Implementations
impl<T> AbiExample for T
impl<T> AbiExample for T
default fn example() -> T
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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
impl<T> Pointable for T
impl<T> Pointable for T
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more