Struct ssh::ExecBroker
source · pub struct ExecBroker { /* private fields */ }
Implementations§
source§impl ExecBroker
impl ExecBroker
sourcepub fn send_command(&mut self, command: &str) -> SshResult<()>
pub fn send_command(&mut 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(&mut self) -> SshResult<Vec<u8>>
pub fn get_result(&mut self) -> SshResult<Vec<u8>>
Get the result of the prior command
This method will block until the server close the channel
Methods from Deref<Target = ChannelBroker>§
sourcepub fn exit_status(&self) -> SshResult<u32>
pub fn exit_status(&self) -> SshResult<u32>
https://datatracker.ietf.org/doc/html/rfc4254#section-6.10
Return the command execute status
sourcepub fn terminate_msg(&self) -> SshResult<String>
pub fn terminate_msg(&self) -> SshResult<String>
https://datatracker.ietf.org/doc/html/rfc4254#section-6.10
Return the terminate message if the command excution was ‘killed’ by a signal
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