pub struct Idl {
pub version: String,
pub name: String,
pub constants: Vec<IdlConst>,
pub instructions: Vec<IdlInstruction>,
pub state: Option<IdlState>,
pub accounts: Vec<IdlTypeDefinition>,
pub types: Vec<IdlTypeDefinition>,
pub events: Option<Vec<IdlEvent>>,
pub errors: Option<Vec<IdlErrorCode>>,
pub metadata: Option<IdlMetadata>,
}Expand description
IDL that is compatible with what anchor and shank extract from a solana program.
Fields§
§version: StringVersion of the Solana contract at the time the IDL was generated.
name: StringThe name of the program.
constants: Vec<IdlConst>Program constants.
instructions: Vec<IdlInstruction>Instructions that are handled by the program.
state: Option<IdlState>Program state.
accounts: Vec<IdlTypeDefinition>Accounts holding data that are used by the program.
types: Vec<IdlTypeDefinition>Types defined in the program that are used by account structs.
events: Option<Vec<IdlEvent>>Events emitted by the program.
errors: Option<Vec<IdlErrorCode>>Errors used inside the program.
metadata: Option<IdlMetadata>Metadata about the program (only available for programs generated by Shank).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Idl
impl<'de> Deserialize<'de> for Idl
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Idl, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Idl, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for Idl
impl Serialize for Idl
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 Eq for Idl
impl StructuralPartialEq for Idl
Auto Trait Implementations§
impl Freeze for Idl
impl RefUnwindSafe for Idl
impl Send for Idl
impl Sync for Idl
impl Unpin for Idl
impl UnwindSafe for Idl
Blanket Implementations§
Source§impl<T> AbiEnumVisitor for T
impl<T> AbiEnumVisitor for T
default fn visit_for_abi( &self, _digester: &mut AbiDigester, ) -> Result<AbiDigester, DigestError>
Source§impl<T> AbiEnumVisitor for T
impl<T> AbiEnumVisitor for T
default fn visit_for_abi( &self, digester: &mut AbiDigester, ) -> Result<AbiDigester, DigestError>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more