pub async fn send_command(
socket_path: &Path,
command: DaemonCommand,
) -> Result<DaemonResponse>Expand description
Sends a command to the daemon and returns the response.
Connects to the Unix socket, sends the command, and reads the response.
§Arguments
socket_path- Path to the daemon’s Unix socketcommand- The command to send
§Errors
Returns an error if the connection fails, the command cannot be sent, or the response cannot be read or parsed.