Enum anchor_cli::IdlCommand
source · [−]pub enum IdlCommand {
Init {
program_id: Pubkey,
filepath: String,
},
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>,
},
Fetch {
address: Pubkey,
out: Option<String>,
},
}
Variants
Init
Initializes a program’s IDL account. Can only be run once.
WriteBuffer
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
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 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.
Parses an IDL from source.
Fetch
Fetches an IDL for the given address from a cluster. The address can be a program, IDL account, or IDL buffer.
Trait Implementations
sourceimpl CommandFactory for IdlCommand
impl CommandFactory for IdlCommand
sourcefn into_app<'b>() -> Command<'b>
fn into_app<'b>() -> Command<'b>
Replaced with `CommandFactory::command
Deprecated, replaced with CommandFactory::command
sourcefn into_app_for_update<'b>() -> Command<'b>
fn into_app_for_update<'b>() -> Command<'b>
Replaced with `CommandFactory::command_for_update
Deprecated, replaced with CommandFactory::command_for_update
sourcefn command_for_update<'help>() -> App<'help>
fn command_for_update<'help>() -> App<'help>
sourceimpl Debug for IdlCommand
impl Debug for IdlCommand
sourceimpl FromArgMatches for IdlCommand
impl FromArgMatches for IdlCommand
sourcefn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Instantiate Self
from ArgMatches
, parsing the arguments as needed. Read more
sourcefn update_from_arg_matches<'b>(
&mut self,
__clap_arg_matches: &ArgMatches
) -> Result<(), Error>
fn update_from_arg_matches<'b>(
&mut self,
__clap_arg_matches: &ArgMatches
) -> Result<(), Error>
Assign values from ArgMatches
to self
.
sourceimpl Parser for IdlCommand
impl Parser for IdlCommand
sourcefn parse_from<I, T>(itr: I) -> Self where
I: IntoIterator<Item = T>,
T: Into<OsString> + Clone,
fn parse_from<I, T>(itr: I) -> Self where
I: IntoIterator<Item = T>,
T: Into<OsString> + Clone,
Parse from iterator, exit on error
sourcefn try_parse_from<I, T>(itr: I) -> Result<Self, Error> where
I: IntoIterator<Item = T>,
T: Into<OsString> + Clone,
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.
sourcefn update_from<I, T>(&mut self, itr: I) where
I: IntoIterator<Item = T>,
T: Into<OsString> + Clone,
fn update_from<I, T>(&mut self, itr: I) where
I: IntoIterator<Item = T>,
T: Into<OsString> + Clone,
Update from iterator, exit on error
sourcefn try_update_from<I, T>(&mut self, itr: I) -> Result<(), Error> where
I: IntoIterator<Item = T>,
T: Into<OsString> + Clone,
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.
sourceimpl Subcommand for IdlCommand
impl Subcommand for IdlCommand
sourcefn augment_subcommands<'b>(__clap_app: Command<'b>) -> Command<'b>
fn augment_subcommands<'b>(__clap_app: Command<'b>) -> Command<'b>
sourcefn augment_subcommands_for_update<'b>(__clap_app: Command<'b>) -> Command<'b>
fn augment_subcommands_for_update<'b>(__clap_app: Command<'b>) -> Command<'b>
sourcefn has_subcommand(__clap_name: &str) -> bool
fn has_subcommand(__clap_name: &str) -> bool
Test whether Self
can parse a specific subcommand
Auto Trait Implementations
impl RefUnwindSafe for IdlCommand
impl Send for IdlCommand
impl Sync for IdlCommand
impl Unpin for IdlCommand
impl UnwindSafe for IdlCommand
Blanket Implementations
impl<T> AbiExample for T
impl<T> AbiExample for T
default fn example() -> T
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<T> Pointable for T
impl<T> Pointable for T
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
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
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more