Struct ssh::ExecBroker
source · pub struct ExecBroker(/* private fields */);
Implementations§
source§impl ExecBroker
impl ExecBroker
sourcepub fn send_command(&self, command: &str) -> SshResult<()>
pub fn send_command(&self, command: &str) -> SshResult<()>
Send an executable command to the server
This method is non-block as it will not wait the result
sourcepub fn get_result(self) -> SshResult<Vec<u8>>
pub fn get_result(self) -> SshResult<Vec<u8>>
Get the result of the prior command
This method will block until the server close the channel
This method also implicitly consume the channel object, since the exec channel can only execute one command
Trait Implementations§
source§impl Deref for ExecBroker
impl Deref for ExecBroker
Auto Trait Implementations§
impl RefUnwindSafe for ExecBroker
impl Send for ExecBroker
impl !Sync for ExecBroker
impl Unpin for ExecBroker
impl UnwindSafe for ExecBroker
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