Re-exports§
pub extern crate alloc;
Modules§
Macros§
- account
- error
- event
- Declare a log-gable event struct.
- impl_
to_ bytes - Returns a raw slice of the account’s bytes.
- impl_
to_ bytes_ mut - Returns a mutable raw slice of the account’s bytes.
- instruction
Structs§
- Close
Program Account - Close a program account
- Create
Program Account - Create a new program account.
- Emit
Event - Log an event by making a self-CPI that can be subscribed to by clients.
- Resize
Program Account - Resize existing program account.
- Validation
- Build dynamic validation rules for AccountInfo
Constants§
- EMIT_
EVENT_ DISCRIMINATOR - Fixed discriminator for the
EmitEventinstruction. - ERROR_
INVALID_ UTF8 - ERROR_
STRING_ TOO_ LONG - HASH_
LENGTH - MAX_
CPI_ INSTRUCTION_ DATA_ LEN - SYSVAR_
PROGRAM_ ID
Traits§
- Account
- Account
Deserialize - Account
Header Deserialize - where the former resolves the type of the latter (e.g. merkle trees with a generic size const). This trait parses a header type from the first N bytes of some data, and returns the remaining bytes, which are then available for further processing.
- Account
Validation - AsAccount
- Performs:
- Discriminator
- Instruction
- Instruction
Deserialize - Instruction
Header Deserialize - Loggable
- Supports logging.
Functions§
- bytes_
to_ string - Converts a fixed-size byte array into a String, handling null termination.
- hash
- hash_
into - hash_
ref - hashv
- parse_
instruction - Parses an instruction from the instruction data.
- parse_
pubkey - parse_
u32 - parse_
u64 - string_
to_ bytes - Converts a string into a fixed-size byte array of length N.
- trace
- Logs the call trace and returns the error.