[−][src]Trait grep_searcher::SinkError
A trait that describes errors that can be reported by searchers and
implementations of Sink
.
Unless you have a specialized use case, you probably don't need to
implement this trait explicitly. It's likely that using io::Error
(which
implements this trait) for your error type is good enough, largely because
most errors that occur during search will likely be an io::Error
.
Required methods
fn error_message<T: Display>(message: T) -> Self
A constructor for converting any value that satisfies the
fmt::Display
trait into an error.
Provided methods
fn error_io(err: Error) -> Self
A constructor for converting I/O errors that occur while searching into an error of this type.
By default, this is implemented via the error_message
constructor.
fn error_config(err: ConfigError) -> Self
A constructor for converting configuration errors that occur while building a searcher into an error of this type.
By default, this is implemented via the error_message
constructor.
Implementations on Foreign Types
impl SinkError for Error
[src]
An io::Error
can be used as an error for Sink
implementations out of
the box.
impl SinkError for Box<dyn Error>
[src]
A Box<std::error::Error>
can be used as an error for Sink
implementations out of the box.