pub struct ProgramNode {
pub name: CamelCaseString,
pub public_key: String,
pub version: String,
pub origin: Option<String>,
pub docs: Docs,
pub accounts: Vec<AccountNode>,
pub instructions: Vec<InstructionNode>,
pub defined_types: Vec<DefinedTypeNode>,
pub pdas: Vec<PdaNode>,
pub errors: Vec<ErrorNode>,
}
Fields§
§name: CamelCaseString
§public_key: String
§version: String
§origin: Option<String>
§docs: Docs
§accounts: Vec<AccountNode>
§instructions: Vec<InstructionNode>
§defined_types: Vec<DefinedTypeNode>
§pdas: Vec<PdaNode>
§errors: Vec<ErrorNode>
Implementations§
Source§impl ProgramNode
impl ProgramNode
pub fn new<T, U>(name: T, public_key: U) -> ProgramNode
pub fn set_version<T>(self, version: T) -> ProgramNode
pub fn add_account(self, account: AccountNode) -> ProgramNode
pub fn add_instruction(self, instruction: InstructionNode) -> ProgramNode
pub fn add_defined_type(self, defined_type: DefinedTypeNode) -> ProgramNode
pub fn add_pda(self, pda: PdaNode) -> ProgramNode
pub fn add_error(self, error: ErrorNode) -> ProgramNode
Trait Implementations§
Source§impl Clone for ProgramNode
impl Clone for ProgramNode
Source§fn clone(&self) -> ProgramNode
fn clone(&self) -> ProgramNode
Returns a duplicate 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 ProgramNode
impl Debug for ProgramNode
Source§impl Default for ProgramNode
impl Default for ProgramNode
Source§fn default() -> ProgramNode
fn default() -> ProgramNode
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ProgramNode
impl<'de> Deserialize<'de> for ProgramNode
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ProgramNode, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ProgramNode, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<ProgramNode> for Node
impl From<ProgramNode> for Node
Source§fn from(value: ProgramNode) -> Node
fn from(value: ProgramNode) -> Node
Converts to this type from the input type.
Source§impl From<ProgramNode> for RootNode
impl From<ProgramNode> for RootNode
Source§fn from(program: ProgramNode) -> RootNode
fn from(program: ProgramNode) -> RootNode
Converts to this type from the input type.
Source§impl HasName for ProgramNode
impl HasName for ProgramNode
fn name(&self) -> &CamelCaseString
Source§impl NodeTrait for ProgramNode
impl NodeTrait for ProgramNode
Source§impl PartialEq for ProgramNode
impl PartialEq for ProgramNode
Source§impl Serialize for ProgramNode
impl Serialize for ProgramNode
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for ProgramNode
Auto Trait Implementations§
impl Freeze for ProgramNode
impl RefUnwindSafe for ProgramNode
impl Send for ProgramNode
impl Sync for ProgramNode
impl Unpin for ProgramNode
impl UnwindSafe for ProgramNode
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