pub struct SyncSession { /* private fields */ }Expand description
A synchronous session wrapper.
This wraps an async session and provides blocking methods for use in synchronous contexts.
Implementations§
Source§impl SyncSession
impl SyncSession
Sourcepub fn spawn_with_config(
command: &str,
args: &[&str],
config: SessionConfig,
) -> Result<Self>
pub fn spawn_with_config( command: &str, args: &[&str], config: SessionConfig, ) -> Result<Self>
Sourcepub const fn config(&self) -> &SessionConfig
pub const fn config(&self) -> &SessionConfig
Get the session configuration.
Sourcepub fn send_control(&mut self, ctrl: ControlChar) -> Result<()>
pub fn send_control(&mut self, ctrl: ControlChar) -> Result<()>
Sourcepub fn expect_timeout(
&mut self,
pattern: impl Into<Pattern>,
timeout: Duration,
) -> Result<Match>
pub fn expect_timeout( &mut self, pattern: impl Into<Pattern>, timeout: Duration, ) -> Result<Match>
Sourcepub fn clear_buffer(&mut self)
pub fn clear_buffer(&mut self)
Clear the buffer.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for SyncSession
impl !RefUnwindSafe for SyncSession
impl Send for SyncSession
impl Sync for SyncSession
impl Unpin for SyncSession
impl !UnwindSafe for SyncSession
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