Add ConnTx::send_only
This commit is contained in:
parent
09a9620f8e
commit
46d9367670
5 changed files with 11 additions and 5 deletions
|
|
@ -330,6 +330,12 @@ impl ConnTx {
|
|||
Self::finish_send::<C>(rx)
|
||||
}
|
||||
|
||||
/// Like [`Self::send`] but ignoring the server's reply.
|
||||
pub fn send_only<C: Into<Data>>(&self, cmd: C) {
|
||||
let (tx, _) = oneshot::channel();
|
||||
let _ = self.cmd_tx.send(ConnCommand::SendCmd(cmd.into(), tx));
|
||||
}
|
||||
|
||||
pub async fn state(&self) -> Result<State> {
|
||||
let (tx, rx) = oneshot::channel();
|
||||
self.cmd_tx
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue