pub enum PtyError {
Spawn(String),
Io(String),
Resize(String),
Write(String),
Shutdown(String),
Closed,
Unsupported(String),
}Expand description
Failure returned by PTY abstraction operations.
Backend error strings are stored verbatim for diagnostics and serialization; they are not structured sources, redacted, or guaranteed stable across OSes and backend versions. Match the variant for control flow, not display text.
§Examples
use ailloli_ui_terminal_pty::PtyError;
let error = PtyError::Resize("invalid dimensions".into());
assert_eq!(error.to_string(), "resize failed: invalid dimensions");
assert!(matches!(error, PtyError::Resize(_)));Variants§
Spawn(String)
PTY allocation or child-process spawn failed.
Io(String)
Reader creation or another uncategorized PTY I/O operation failed.
Resize(String)
Master-side size update or resize locking failed.
Write(String)
Input write, flush, or writer locking failed.
Shutdown(String)
Child termination or killer locking failed.
Closed
Operation requires a session that has not shut down.
Unsupported(String)
Selected backend does not implement the requested operation.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for PtyError
impl<'de> Deserialize<'de> for PtyError
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Error for PtyError
impl Error for PtyError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
impl Eq for PtyError
impl StructuralPartialEq for PtyError
Auto Trait Implementations§
impl Freeze for PtyError
impl RefUnwindSafe for PtyError
impl Send for PtyError
impl Sync for PtyError
impl Unpin for PtyError
impl UnwindSafe for PtyError
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.