Struct kaspa_cli_lib::KaspaCli
source · pub struct KaspaCli { /* private fields */ }Implementations§
source§impl KaspaCli
impl KaspaCli
pub fn init()
pub async fn try_new_arc(options: Options) -> Result<Arc<Self>>
pub fn term(&self) -> Arc<Terminal>
pub fn try_term(&self) -> Option<Arc<Terminal>>
pub fn notifier(&self) -> &Notifier
pub fn version(&self) -> String
pub fn wallet(&self) -> Arc<Wallet>
pub fn is_connected(&self) -> bool
pub fn rpc_api(&self) -> Arc<DynRpcApi>
pub fn rpc_client(&self) -> Option<Arc<KaspaRpcClient>>
pub fn store(&self) -> Arc<dyn Interface>
pub fn daemons(&self) -> &Arc<Daemons>
pub fn handlers(&self) -> Arc<HandlerCli>
pub fn flags(&self) -> &Flags
pub fn toggle_mute(&self) -> &'static str
pub fn is_mutted(&self) -> bool
pub fn register_metrics(self: &Arc<Self>) -> Result<()>
pub fn register_handlers(self: &Arc<Self>) -> Result<()>
pub async fn handle_daemon_event( self: &Arc<Self>, event: DaemonEvent ) -> Result<()>
pub async fn start(self: &Arc<Self>) -> Result<()>
pub async fn run(self: &Arc<Self>) -> Result<()>
pub async fn stop(self: &Arc<Self>) -> Result<()>
pub async fn account(&self) -> Result<Arc<dyn Account>>
pub async fn find_accounts_by_name_or_id( &self, pat: &str ) -> Result<Arc<dyn Account>>
pub async fn prompt_account(&self) -> Result<Arc<dyn Account>>
pub async fn select_account(&self) -> Result<Arc<dyn Account>>
pub async fn select_private_key(&self) -> Result<Arc<PrvKeyDataInfo>>
pub async fn select_private_key_with_args( &self, autoselect: bool ) -> Result<Arc<PrvKeyDataInfo>>
pub async fn list(&self) -> Result<()>
pub async fn shutdown(&self) -> Result<()>
Trait Implementations§
source§impl Cli for KaspaCli
impl Cli for KaspaCli
fn init(self: Arc<Self>, term: &Arc<Terminal>) -> TerminalResult<()>
fn digest<'async_trait>( self: Arc<Self>, term: Arc<Terminal>, cmd: String ) -> Pin<Box<dyn Future<Output = TerminalResult<()>> + Send + 'async_trait>>where Self: 'async_trait,
fn complete<'async_trait>( self: Arc<Self>, _term: Arc<Terminal>, cmd: String ) -> Pin<Box<dyn Future<Output = TerminalResult<Option<Vec<String>>>> + Send + 'async_trait>>where Self: 'async_trait,
fn prompt(&self) -> Option<String>
Auto Trait Implementations§
impl !RefUnwindSafe for KaspaCli
impl Send for KaspaCli
impl Sync for KaspaCli
impl !Unpin for KaspaCli
impl !UnwindSafe for KaspaCli
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
§impl<T> CastFrom for Twhere
T: Any + 'static,
impl<T> CastFrom for Twhere T: Any + 'static,
§fn ref_any(&self) -> &(dyn Any + 'static)
fn ref_any(&self) -> &(dyn Any + 'static)
Returns a immutable reference to
Any, which is backed by the type implementing this trait.§fn mut_any(&mut self) -> &mut (dyn Any + 'static)
fn mut_any(&mut self) -> &mut (dyn Any + 'static)
Returns a mutable reference to
Any, which is backed by the type implementing this trait.§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.