Struct spl_record::state::RecordData
source · pub struct RecordData {
pub version: u8,
pub authority: Pubkey,
pub data: Data,
}Expand description
Struct wrapping data and providing metadata
Fields§
§version: u8Struct version, allows for upgrades to the program
The account allowed to update the data
data: DataThe data contained by the account, could be anything serializable
Implementations§
source§impl RecordData
impl RecordData
sourcepub const CURRENT_VERSION: u8 = 1u8
pub const CURRENT_VERSION: u8 = 1u8
Version to fill in on new created accounts
sourcepub const WRITABLE_START_INDEX: usize = 33usize
pub const WRITABLE_START_INDEX: usize = 33usize
Start of writable account data, after version and authority
Trait Implementations§
source§impl BorshDeserialize for RecordDatawhere
u8: BorshDeserialize,
Pubkey: BorshDeserialize,
Data: BorshDeserialize,
impl BorshDeserialize for RecordDatawhere u8: BorshDeserialize, Pubkey: BorshDeserialize, Data: BorshDeserialize,
source§impl BorshSchema for RecordDatawhere
u8: BorshSchema,
Pubkey: BorshSchema,
Data: BorshSchema,
impl BorshSchema for RecordDatawhere u8: BorshSchema, Pubkey: BorshSchema, Data: BorshSchema,
source§fn declaration() -> Declaration
fn declaration() -> Declaration
Get the name of the type without brackets.
source§fn 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.
source§fn 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
source§impl BorshSerialize for RecordDatawhere
u8: BorshSerialize,
Pubkey: BorshSerialize,
Data: BorshSerialize,
impl BorshSerialize for RecordDatawhere u8: BorshSerialize, Pubkey: BorshSerialize, Data: BorshSerialize,
source§impl Clone for RecordData
impl Clone for RecordData
source§fn clone(&self) -> RecordData
fn clone(&self) -> RecordData
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl Debug for RecordData
impl Debug for RecordData
source§impl IsInitialized for RecordData
impl IsInitialized for RecordData
source§fn is_initialized(&self) -> bool
fn is_initialized(&self) -> bool
Is initialized
source§impl PartialEq<RecordData> for RecordData
impl PartialEq<RecordData> for RecordData
source§fn eq(&self, other: &RecordData) -> bool
fn eq(&self, other: &RecordData) -> bool
This method tests for
self and other values to be equal, and is used
by ==.impl StructuralPartialEq for RecordData
Auto Trait Implementations§
impl RefUnwindSafe for RecordData
impl Send for RecordData
impl Sync for RecordData
impl Unpin for RecordData
impl UnwindSafe for RecordData
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