DaemonClient

Trait DaemonClient 

Source
pub trait DaemonClient: Send + Sync {
    // Required methods
    fn call(
        &mut self,
        method: &str,
        params: Option<Value>,
    ) -> Result<Value, ClientError>;
    fn call_with_config(
        &mut self,
        method: &str,
        params: Option<Value>,
        config: &DaemonClientConfig,
    ) -> Result<Value, ClientError>;
    fn call_with_retry(
        &mut self,
        method: &str,
        params: Option<Value>,
        max_retries: u32,
    ) -> Result<Value, ClientError>;
}
Expand description

Trait for daemon client implementations.

This trait abstracts the communication with the daemon, allowing for different transport implementations (Unix socket, mock for testing, etc.).

Required Methods§

Source

fn call( &mut self, method: &str, params: Option<Value>, ) -> Result<Value, ClientError>

Make an RPC call to the daemon.

Source

fn call_with_config( &mut self, method: &str, params: Option<Value>, config: &DaemonClientConfig, ) -> Result<Value, ClientError>

Make an RPC call with custom configuration.

Source

fn call_with_retry( &mut self, method: &str, params: Option<Value>, max_retries: u32, ) -> Result<Value, ClientError>

Make an RPC call with retry logic.

Implementors§