Struct spl_governance::state::program_metadata::ProgramMetadata
source · [−]#[repr(C)]pub struct ProgramMetadata {
pub account_type: GovernanceAccountType,
pub updated_at: Slot,
pub version: String,
pub reserved: [u8; 64],
}
Expand description
Program metadata account. It stores information about the particular SPL-Governance program instance
Fields
account_type: GovernanceAccountType
Governance account type
updated_at: Slot
The slot when the metadata was captured
version: String
The version of the program Max 11 characters XXX.YYY.ZZZ
reserved: [u8; 64]
Reserved
Trait Implementations
sourceimpl AccountMaxSize for ProgramMetadata
impl AccountMaxSize for ProgramMetadata
sourcefn get_max_size(&self) -> Option<usize>
fn get_max_size(&self) -> Option<usize>
Returns max account size or None if max size is not known and actual instance size should be used
sourceimpl BorshDeserialize for ProgramMetadata where
GovernanceAccountType: BorshDeserialize,
Slot: BorshDeserialize,
String: BorshDeserialize,
[u8; 64]: BorshDeserialize,
impl BorshDeserialize for ProgramMetadata where
GovernanceAccountType: BorshDeserialize,
Slot: BorshDeserialize,
String: BorshDeserialize,
[u8; 64]: BorshDeserialize,
sourceimpl BorshSchema for ProgramMetadata where
GovernanceAccountType: BorshSchema,
Slot: BorshSchema,
String: BorshSchema,
[u8; 64]: BorshSchema,
impl BorshSchema for ProgramMetadata where
GovernanceAccountType: BorshSchema,
Slot: BorshSchema,
String: BorshSchema,
[u8; 64]: BorshSchema,
sourcefn declaration() -> Declaration
fn declaration() -> Declaration
Get the name of the type without brackets.
sourcefn add_definitions_recursively(
definitions: &mut HashMap<Declaration, Definition>
)
fn add_definitions_recursively(
definitions: &mut HashMap<Declaration, Definition>
)
Recursively, using DFS, add type definitions required for this type. For primitive types this is an empty map. Type definition explains how to serialize/deserialize a type. Read more
sourcefn add_definition(
declaration: String,
definition: Definition,
definitions: &mut HashMap<String, Definition, RandomState>
)
fn add_definition(
declaration: String,
definition: Definition,
definitions: &mut HashMap<String, Definition, RandomState>
)
Helper method to add a single type definition to the map.
fn schema_container() -> BorshSchemaContainer
sourceimpl BorshSerialize for ProgramMetadata where
GovernanceAccountType: BorshSerialize,
Slot: BorshSerialize,
String: BorshSerialize,
[u8; 64]: BorshSerialize,
impl BorshSerialize for ProgramMetadata where
GovernanceAccountType: BorshSerialize,
Slot: BorshSerialize,
String: BorshSerialize,
[u8; 64]: BorshSerialize,
sourceimpl Clone for ProgramMetadata
impl Clone for ProgramMetadata
sourcefn clone(&self) -> ProgramMetadata
fn clone(&self) -> ProgramMetadata
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 Debug for ProgramMetadata
impl Debug for ProgramMetadata
sourceimpl IsInitialized for ProgramMetadata
impl IsInitialized for ProgramMetadata
sourcefn is_initialized(&self) -> bool
fn is_initialized(&self) -> bool
Is initialized
sourceimpl PartialEq<ProgramMetadata> for ProgramMetadata
impl PartialEq<ProgramMetadata> for ProgramMetadata
sourcefn eq(&self, other: &ProgramMetadata) -> bool
fn eq(&self, other: &ProgramMetadata) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &ProgramMetadata) -> bool
fn ne(&self, other: &ProgramMetadata) -> bool
This method tests for !=
.
impl StructuralPartialEq for ProgramMetadata
Auto Trait Implementations
impl RefUnwindSafe for ProgramMetadata
impl Send for ProgramMetadata
impl Sync for ProgramMetadata
impl Unpin for ProgramMetadata
impl UnwindSafe for ProgramMetadata
Blanket Implementations
impl<T> AbiExample for T
impl<T> AbiExample for T
pub default fn example() -> T
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
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.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more