pub struct CommandRouter { /* private fields */ }Expand description
Command routing and dispatch logic
Implementations§
Source§impl CommandRouter
impl CommandRouter
Sourcepub async fn with_peer_manager() -> Result<Self, CliError>
pub async fn with_peer_manager() -> Result<Self, CliError>
Create CommandRouter with initialized PeerManager
Sourcepub async fn handle_node_status(args: StatusArgs) -> Result<String, CliError>
pub async fn handle_node_status(args: StatusArgs) -> Result<String, CliError>
Route and execute node status command
Sourcepub async fn handle_peer_list(&self, port: Option<u16>) -> Result<(), CliError>
pub async fn handle_peer_list(&self, port: Option<u16>) -> Result<(), CliError>
Route and execute peer list command
Sourcepub async fn handle_peer_add(
&self,
address: String,
port: Option<u16>,
nickname: Option<String>,
) -> Result<(), CliError>
pub async fn handle_peer_add( &self, address: String, port: Option<u16>, nickname: Option<String>, ) -> Result<(), CliError>
Route and execute peer add command
Sourcepub async fn handle_peer_remove(
&self,
peer_id: String,
port: Option<u16>,
force: bool,
) -> Result<(), CliError>
pub async fn handle_peer_remove( &self, peer_id: String, port: Option<u16>, force: bool, ) -> Result<(), CliError>
Route and execute peer remove command
Sourcepub async fn handle_network_stats(
&self,
port: Option<u16>,
verbose: bool,
) -> Result<(), CliError>
pub async fn handle_network_stats( &self, port: Option<u16>, verbose: bool, ) -> Result<(), CliError>
Route and execute network stats command
Sourcepub async fn handle_network_test(
&self,
port: Option<u16>,
) -> Result<(), CliError>
pub async fn handle_network_test( &self, port: Option<u16>, ) -> Result<(), CliError>
Route and execute network test command
Sourcepub async fn handle_peer_info(
&self,
peer_id: String,
port: Option<u16>,
) -> Result<(), CliError>
pub async fn handle_peer_info( &self, peer_id: String, port: Option<u16>, ) -> Result<(), CliError>
Route and execute peer info command
Sourcepub async fn handle_peer_ban(
&self,
peer_id: String,
port: Option<u16>,
) -> Result<(), CliError>
pub async fn handle_peer_ban( &self, peer_id: String, port: Option<u16>, ) -> Result<(), CliError>
Route and execute peer ban command
Sourcepub async fn handle_peer_unban(
&self,
address: String,
port: Option<u16>,
) -> Result<(), CliError>
pub async fn handle_peer_unban( &self, address: String, port: Option<u16>, ) -> Result<(), CliError>
Route and execute peer unban command
Sourcepub async fn handle_peer_import(
&self,
path: PathBuf,
merge: bool,
) -> Result<(), CliError>
pub async fn handle_peer_import( &self, path: PathBuf, merge: bool, ) -> Result<(), CliError>
Route and execute peer import command
Sourcepub async fn handle_peer_export(
&self,
path: PathBuf,
tags: Option<Vec<String>>,
) -> Result<(), CliError>
pub async fn handle_peer_export( &self, path: PathBuf, tags: Option<Vec<String>>, ) -> Result<(), CliError>
Route and execute peer export command
Sourcepub async fn handle_peer_test(&self) -> Result<(), CliError>
pub async fn handle_peer_test(&self) -> Result<(), CliError>
Route and execute peer test command
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CommandRouter
impl !RefUnwindSafe for CommandRouter
impl Send for CommandRouter
impl Sync for CommandRouter
impl Unpin for CommandRouter
impl !UnwindSafe for CommandRouter
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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> 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