Struct cyclos_core::states::factory::FactoryState
source · [−]Expand description
Holds the current owner of the factory
The owner can
- Set and collect a pool’s protocol fees
- Enable a new fee amount for pool creation
- Set another address as an owner
PDA of []
Fields
bump: u8Bump to identify PDA
owner: PubkeyAddress of the protocol owner
fee_protocol: u8The global protocol fee
Trait Implementations
sourceimpl AccountDeserialize for FactoryState
impl AccountDeserialize for FactoryState
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 Clone for FactoryState
impl Clone for FactoryState
sourcefn clone(&self) -> FactoryState
fn clone(&self) -> FactoryState
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 more
sourceimpl Default for FactoryState
impl Default for FactoryState
sourcefn default() -> FactoryState
fn default() -> FactoryState
Returns the “default value” for a type. Read more
sourceimpl Discriminator for FactoryState
impl Discriminator for FactoryState
fn discriminator() -> [u8; 8]
sourceimpl Owner for FactoryState
impl Owner for FactoryState
sourceimpl Zeroable for FactoryState
impl Zeroable for FactoryState
impl Copy for FactoryState
impl Pod for FactoryState
impl ZeroCopy for FactoryState
Auto Trait Implementations
impl RefUnwindSafe for FactoryState
impl Send for FactoryState
impl Sync for FactoryState
impl Unpin for FactoryState
impl UnwindSafe for FactoryState
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> CheckedBitPattern for T where
T: AnyBitPattern,
impl<T> CheckedBitPattern for T where
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
fn is_valid_bit_pattern(_bits: &T) -> bool
fn is_valid_bit_pattern(_bits: &T) -> bool
If this function returns true, then it must be valid to reinterpret bits as &Self.
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