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 try_rpc_api(&self) -> Option<Arc<DynRpcApi>>
pub fn try_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 !Freeze for KaspaCli
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
Source§impl<S> CastArc for Swhere
S: CastFromSync + ?Sized,
impl<S> CastArc for Swhere
S: CastFromSync + ?Sized,
Source§impl<T> CastFrom for Twhere
T: Any + 'static,
impl<T> CastFrom for Twhere
T: Any + 'static,
Source§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.Source§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.Source§impl<T> CastFromSync for T
impl<T> CastFromSync for T
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§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
.Source§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
.Source§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.Source§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.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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