pub enum Error {
Show 22 variants
ChannelFull,
ChannelSkipped,
ChannelClosed,
ChannelEmpty,
HubSend(Box<Error>),
HubAlreadyRegistered(Arc<str>),
Timeout,
IO(Error),
Comm(String),
API(String, i64),
RTGetTId(c_int),
RTSchedSetAffinity(String),
RTSchedSetSchduler(String),
SupervisorNameNotSpecified,
SupervisorDuplicateTask(String),
SupervisorTaskNotFound,
InvalidData(String),
BinRw(String),
Unimplemented,
Infallible(Infallible),
AccessDenied,
Failed(String),
}Expand description
The crate error type
Variants§
ChannelFull
the channel is full and the value can not be sent
ChannelSkipped
the channel is full, an optional value is skipped. the error can be ignored but should be logged
ChannelClosed
The channel is closed (all transmitters/receivers gone)
ChannelEmpty
Receive attempt failed because the channel is empty
HubSend(Box<Error>)
Hub send errors
HubAlreadyRegistered(Arc<str>)
Hub client with the given name is already registered
Timeout
Timeouts
IO(Error)
Standard I/O errors
Comm(String)
Non-standard I/O errors
API(String, i64)
3rd party API errors
RTGetTId(c_int)
Real-time engine error: unable to get the system thread id
RTSchedSetAffinity(String)
Real-time engine error: unable to set the thread scheduler affinity
RTSchedSetSchduler(String)
Real-time engine error: unable to set the thread scheduler policy
SupervisorNameNotSpecified
Supervisor error: task name is not specified in the thread builder
SupervisorDuplicateTask(String)
Supervisor error: task with the given name is already registered
SupervisorTaskNotFound
Supervisor error: task with the given name is not found
InvalidData(String)
Invalid data receied / parameters provided
BinRw(String)
binrw crate errors
Unimplemented
The requested operation is not implemented
Infallible(Infallible)
This error never happens and is used as a compiler hint only
AccessDenied
Syscall / internal API access denied
Failed(String)
All other errors
Implementations§
Source§impl Error
impl Error
Sourcepub fn is_data_skipped(&self) -> bool
pub fn is_data_skipped(&self) -> bool
Returns true if the data is skipped
Sourcepub fn invalid_data<S: Display>(msg: S) -> Self
pub fn invalid_data<S: Display>(msg: S) -> Self
Creates new invalid data error
Trait Implementations§
Source§impl Error for Error
impl Error for Error
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
Source§impl From<Infallible> for Error
impl From<Infallible> for Error
Source§fn from(source: Infallible) -> Self
fn from(source: Infallible) -> Self
Source§impl From<ParseFloatError> for Error
impl From<ParseFloatError> for Error
Source§fn from(err: ParseFloatError) -> Self
fn from(err: ParseFloatError) -> Self
Source§impl From<ParseIntError> for Error
impl From<ParseIntError> for Error
Source§fn from(err: ParseIntError) -> Self
fn from(err: ParseIntError) -> Self
Auto Trait Implementations§
impl Freeze for Error
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl !UnwindSafe for Error
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
Source§impl<T> CustomError for T
impl<T> CustomError for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more