Struct ssh_rs::ExecBroker
source · pub struct ExecBroker(_);
Implementations
sourceimpl 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
sourceimpl Deref for ExecBroker
impl Deref for ExecBroker
type Target = ChannelBroker
type Target = ChannelBroker
The resulting type after dereferencing.
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
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more