pub enum IdlCommand {
    Init {
        program_id: Pubkey,
        filepath: String,
    },
    Close {
        program_id: Pubkey,
    },
    WriteBuffer {
        program_id: Pubkey,
        filepath: String,
    },
    SetBuffer {
        program_id: Pubkey,
        buffer: Pubkey,
    },
    Upgrade {
        program_id: Pubkey,
        filepath: String,
    },
    SetAuthority {
        address: Option<Pubkey>,
        program_id: Pubkey,
        new_authority: Pubkey,
    },
    EraseAuthority {
        program_id: Pubkey,
    },
    Authority {
        program_id: Pubkey,
    },
    Parse {
        file: String,
        out: Option<String>,
        out_ts: Option<String>,
        no_docs: bool,
    },
    Fetch {
        address: Pubkey,
        out: Option<String>,
    },
}

Variants§

§

Init

Fields

§program_id: Pubkey
§filepath: String

Initializes a program’s IDL account. Can only be run once.

§

Close

Fields

§program_id: Pubkey
§

WriteBuffer

Fields

§program_id: Pubkey
§filepath: String

Writes an IDL into a buffer account. This can be used with SetBuffer to perform an upgrade.

§

SetBuffer

Fields

§program_id: Pubkey
§buffer: Pubkey

Address of the buffer account to set as the idl on the program.

Sets a new IDL buffer for the program.

§

Upgrade

Fields

§program_id: Pubkey
§filepath: String

Upgrades the IDL to the new file. An alias for first writing and then then setting the idl buffer account.

§

SetAuthority

Fields

§address: Option<Pubkey>

The IDL account buffer to set the authority of. If none is given, then the canonical IDL account is used.

§program_id: Pubkey

Program to change the IDL authority.

§new_authority: Pubkey

New authority of the IDL account.

Sets a new authority on the IDL account.

§

EraseAuthority

Fields

§program_id: Pubkey

Command to remove the ability to modify the IDL account. This should likely be used in conjection with eliminating an “upgrade authority” on the program.

§

Authority

Fields

§program_id: Pubkey

The program to view.

Outputs the authority for the IDL account.

§

Parse

Fields

§file: String

Path to the program’s interface definition.

§out: Option<String>

Output file for the IDL (stdout if not specified).

§out_ts: Option<String>

Output file for the TypeScript IDL.

§no_docs: bool

Suppress doc strings in output

Parses an IDL from source.

§

Fetch

Fields

§address: Pubkey
§out: Option<String>

Output file for the idl (stdout if not specified).

Fetches an IDL for the given address from a cluster. The address can be a program, IDL account, or IDL buffer.

Trait Implementations§

source§

impl CommandFactory for IdlCommand

source§

fn into_app<'b>() -> Command<'b>

Deprecated, replaced with CommandFactory::command
source§

fn into_app_for_update<'b>() -> Command<'b>

Deprecated, replaced with CommandFactory::command_for_update
source§

fn command<'help>() -> App<'help>

Build a Command that can instantiate Self. Read more
source§

fn command_for_update<'help>() -> App<'help>

Build a Command that can update self. Read more
source§

impl Debug for IdlCommand

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl FromArgMatches for IdlCommand

source§

fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>

Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
source§

fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches ) -> Result<Self, Error>

Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
source§

fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches ) -> Result<(), Error>

Assign values from ArgMatches to self.
source§

fn update_from_arg_matches_mut<'b>( &mut self, __clap_arg_matches: &mut ArgMatches ) -> Result<(), Error>

Assign values from ArgMatches to self.
source§

impl Parser for IdlCommand

source§

fn parse() -> Self

Parse from std::env::args_os(), exit on error
source§

fn try_parse() -> Result<Self, Error>

Parse from std::env::args_os(), return Err on error.
source§

fn parse_from<I, T>(itr: I) -> Selfwhere I: IntoIterator<Item = T>, T: Into<OsString> + Clone,

Parse from iterator, exit on error
source§

fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>where I: IntoIterator<Item = T>, T: Into<OsString> + Clone,

Parse from iterator, return Err on error.
source§

fn update_from<I, T>(&mut self, itr: I)where I: IntoIterator<Item = T>, T: Into<OsString> + Clone,

Update from iterator, exit on error
source§

fn try_update_from<I, T>(&mut self, itr: I) -> Result<(), Error>where I: IntoIterator<Item = T>, T: Into<OsString> + Clone,

Update from iterator, return Err on error.
source§

impl Subcommand for IdlCommand

source§

fn augment_subcommands<'b>(__clap_app: Command<'b>) -> Command<'b>

Append to Command so it can instantiate Self. Read more
source§

fn augment_subcommands_for_update<'b>(__clap_app: Command<'b>) -> Command<'b>

Append to Command so it can update self. Read more
source§

fn has_subcommand(__clap_name: &str) -> bool

Test whether Self can parse a specific subcommand

Auto Trait Implementations§

Blanket Implementations§

§

impl<T> AbiExample for T

§

default fn example() -> T

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere T: 'a,

§

fn implicit( self, class: Class, constructed: bool, tag: u32 ) -> TaggedParser<'a, Implicit, Self, E>

source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> Pointable for T

§

const ALIGN: usize = mem::align_of::<T>()

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere V: MultiLane<T>,

§

fn vzip(self) -> V

source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more