pub enum SendStdinErrorReason {
TaskNotFound,
StdinNotEnabled,
TaskNotActive,
ChannelClosed,
}
Expand description
Reasons why sending stdin to a task might fail.
These errors provide specific context about stdin operation failures, helping users understand why their stdin input couldn’t be delivered.
§Examples
use tcrm_monitor::monitor::error::SendStdinErrorReason;
let error = SendStdinErrorReason::TaskNotFound;
println!("Error: {}", error);
Variants§
TaskNotFound
The specified task does not exist in the task collection.
§Examples
use tcrm_monitor::monitor::error::SendStdinErrorReason;
let error = SendStdinErrorReason::TaskNotFound;
assert!(error.to_string().contains("Task not found"));
StdinNotEnabled
The task exists but does not have stdin enabled.
Tasks must be configured with enable_stdin(true)
to receive input.
§Examples
use tcrm_monitor::monitor::error::SendStdinErrorReason;
let error = SendStdinErrorReason::StdinNotEnabled;
assert!(error.to_string().contains("does not have stdin enabled"));
TaskNotActive
The task is not in a state that can receive stdin input.
For example, the task might not be running yet or has already finished.
§Examples
use tcrm_monitor::monitor::error::SendStdinErrorReason;
let error = SendStdinErrorReason::TaskNotActive;
assert!(error.to_string().contains("not in a state"));
ChannelClosed
The stdin channel for the task is closed or unavailable.
This typically happens when the task has terminated or crashed.
§Examples
use tcrm_monitor::monitor::error::SendStdinErrorReason;
let error = SendStdinErrorReason::ChannelClosed;
assert!(error.to_string().contains("channel closed"));
Trait Implementations§
Source§impl Clone for SendStdinErrorReason
impl Clone for SendStdinErrorReason
Source§fn clone(&self) -> SendStdinErrorReason
fn clone(&self) -> SendStdinErrorReason
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for SendStdinErrorReason
impl Debug for SendStdinErrorReason
Source§impl Display for SendStdinErrorReason
impl Display for SendStdinErrorReason
Source§impl Error for SendStdinErrorReason
impl Error for SendStdinErrorReason
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()
Source§impl PartialEq for SendStdinErrorReason
impl PartialEq for SendStdinErrorReason
impl StructuralPartialEq for SendStdinErrorReason
Auto Trait Implementations§
impl Freeze for SendStdinErrorReason
impl RefUnwindSafe for SendStdinErrorReason
impl Send for SendStdinErrorReason
impl Sync for SendStdinErrorReason
impl Unpin for SendStdinErrorReason
impl UnwindSafe for SendStdinErrorReason
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