Add Builtin AbiExample
This commit is contained in:
@ -137,6 +137,7 @@ pub enum Entrypoint {
|
|||||||
Program(ProcessInstruction),
|
Program(ProcessInstruction),
|
||||||
Loader(ProcessInstructionWithContext),
|
Loader(ProcessInstructionWithContext),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone)]
|
#[derive(Clone)]
|
||||||
pub struct Builtin {
|
pub struct Builtin {
|
||||||
pub name: String,
|
pub name: String,
|
||||||
@ -187,6 +188,17 @@ impl CowCachedExecutors {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(RUSTC_WITH_SPECIALIZATION)]
|
||||||
|
impl AbiExample for Builtin {
|
||||||
|
fn example() -> Self {
|
||||||
|
Self {
|
||||||
|
name: String::default(),
|
||||||
|
id: Pubkey::default(),
|
||||||
|
entrypoint: Entrypoint::Program(|_, _, _| Ok(())),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#[derive(Clone)]
|
#[derive(Clone)]
|
||||||
pub struct Builtins {
|
pub struct Builtins {
|
||||||
/// Builtin programs that are always available
|
/// Builtin programs that are always available
|
||||||
|
Reference in New Issue
Block a user