pub struct PtyController { /* private fields */ }Available on crate features
blocking or tokio only.Expand description
Cloneable control handle shared by both public front ends.
It contains no pipe or runtime-specific state. Clones may be used from any thread, and the pseudoconsole remains alive while the controller or either owned I/O half still exists.
Implementations§
Source§impl PtyController
impl PtyController
Sourcepub fn resize(&self, size: Size) -> Result<()>
pub fn resize(&self, size: Size) -> Result<()>
Resizes the pseudoconsole.
§Errors
Returns an error with crate::ErrorKind::Resize when the session is
closed or the backend rejects the requested size.
Sourcepub fn clear(&self) -> Result<()>
pub fn clear(&self) -> Result<()>
Clears the pseudoconsole screen and scrollback.
§Errors
Returns an error with crate::ErrorKind::UnsupportedFeature when
clearing is unavailable, or crate::ErrorKind::Clear when the
operation fails.
Sourcepub fn supports_clear(&self) -> bool
pub fn supports_clear(&self) -> bool
Returns whether this backend provides ClearPseudoConsole.
Trait Implementations§
Source§impl Clone for PtyController
impl Clone for PtyController
Source§fn clone(&self) -> PtyController
fn clone(&self) -> PtyController
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for PtyController
impl RefUnwindSafe for PtyController
impl Send for PtyController
impl Sync for PtyController
impl Unpin for PtyController
impl UnsafeUnpin for PtyController
impl UnwindSafe for PtyController
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