pub struct MultiCommandSender { /* private fields */ }Implementations§
Source§impl MultiCommandSender
impl MultiCommandSender
pub fn new() -> Self
pub fn add_sender(&mut self, sender: CommandSender)
Sourcepub async fn send_command(&mut self, command: &str) -> Result<String>
pub async fn send_command(&mut self, command: &str) -> Result<String>
Send a command through the first available sender. Returns the response text from the first successful sender.
Sourcepub async fn send_command_ignore_response(
&mut self,
command: &str,
) -> Result<()>
pub async fn send_command_ignore_response( &mut self, command: &str, ) -> Result<()>
Send a command without caring about the response text.
pub fn is_empty(&self) -> bool
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MultiCommandSender
impl !RefUnwindSafe for MultiCommandSender
impl Send for MultiCommandSender
impl Sync for MultiCommandSender
impl Unpin for MultiCommandSender
impl UnsafeUnpin for MultiCommandSender
impl !UnwindSafe for MultiCommandSender
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