pub enum ControlError {
Io(String),
Key(String),
Unauthorized,
Protocol(String),
Remote {
error: String,
detail: Option<Value>,
},
}Expand description
Why a control-port operation failed.
Variants§
Io(String)
Binding, connecting, reading or writing failed.
Key(String)
The key could not be made, written or read.
The app refused the key (it restarted with a new one, or this is someone else’s port).
Protocol(String)
The peer did not speak the protocol.
Remote
The app answered with an error.
Implementations§
Source§impl ControlError
impl ControlError
Sourcepub fn into_command_error(self, id: &str) -> CommandError
pub fn into_command_error(self, id: &str) -> CommandError
As a CommandError: the app’s own when it sent one, otherwise CommandError::Failed.
Trait Implementations§
Source§impl Clone for ControlError
impl Clone for ControlError
Source§impl Debug for ControlError
impl Debug for ControlError
Source§impl Display for ControlError
impl Display for ControlError
Source§impl Error for ControlError
impl Error for ControlError
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 ControlError
impl PartialEq for ControlError
impl StructuralPartialEq for ControlError
Auto Trait Implementations§
impl Forget for ControlError
impl Freeze for ControlError
impl Move for ControlError
impl RefUnwindSafe for ControlError
impl Send for ControlError
impl Sync for ControlError
impl Unpin for ControlError
impl UnsafeUnpin for ControlError
impl UnwindSafe for ControlError
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