pub struct AnchorIdlPartialData { /* private fields */ }Expand description
Holds the address and instructions parsed from JSON IDL.
-
It contains the address of the program (Public Key) defined as a String
-
The instructions of the program
Implementations§
Source§impl AnchorIdlPartialData
impl AnchorIdlPartialData
Sourcepub fn program_id(&self) -> &str
pub fn program_id(&self) -> &str
Get the program ID
Sourcepub fn get_instruction(&self, name: &str) -> Option<&AnchorInstruction>
pub fn get_instruction(&self, name: &str) -> Option<&AnchorInstruction>
Get an instruction by the name defined in the JSON IDL
Sourcepub fn get_discriminant(
&self,
name: &str,
) -> Option<AnchorInstructionDiscriminatLen>
pub fn get_discriminant( &self, name: &str, ) -> Option<AnchorInstructionDiscriminatLen>
Get the discriminant of an instruction given the instruction name
Sourcepub fn get_instructions(&self) -> &[AnchorInstruction]
pub fn get_instructions(&self) -> &[AnchorInstruction]
Get all Instructions
Sourcepub fn get_instruction_names(&self) -> Vec<&str>
pub fn get_instruction_names(&self) -> Vec<&str>
Get all the names for all instructions
Trait Implementations§
Source§impl Debug for AnchorIdlPartialData
impl Debug for AnchorIdlPartialData
Source§impl<'de> Deserialize<'de> for AnchorIdlPartialData
impl<'de> Deserialize<'de> for AnchorIdlPartialData
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for AnchorIdlPartialData
impl PartialEq for AnchorIdlPartialData
Source§impl PartialOrd for AnchorIdlPartialData
impl PartialOrd for AnchorIdlPartialData
impl StructuralPartialEq for AnchorIdlPartialData
Auto Trait Implementations§
impl Freeze for AnchorIdlPartialData
impl RefUnwindSafe for AnchorIdlPartialData
impl Send for AnchorIdlPartialData
impl Sync for AnchorIdlPartialData
impl Unpin for AnchorIdlPartialData
impl UnwindSafe for AnchorIdlPartialData
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