Struct serialport::Error
[−]
[src]
pub struct Error { pub kind: ErrorKind, pub description: String, }
An error type for serial port operations.
Fields
kind: ErrorKind
The kind of error this is
description: String
A description of the error suitable for end-users
Methods
impl Error
[src]
pub fn new<T: Into<String>>(kind: ErrorKind, description: T) -> Self
[src]
Instantiates a new error
pub fn kind(&self) -> ErrorKind
[src]
Returns the corresponding ErrorKind
for this error.
Trait Implementations
impl From<Error> for Error
[src]
impl From<Error> for Error
[src]
impl Debug for Error
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl Display for Error
[src]
fn fmt(&self, fmt: &mut Formatter) -> Result<(), Error>
[src]
Formats the value using the given formatter. Read more
impl StdError for Error
[src]
fn description(&self) -> &str
[src]
A short description of the error. Read more
fn cause(&self) -> Option<&Error>
1.0.0[src]
The lower-level cause of this error, if any. Read more