Skip to main content

StreamError

Trait StreamError 

Source
pub trait StreamError: From<Error> {
    // Provided methods
    fn from_str(str: &'static str) -> Self { ... }
    fn from_string(string: String) -> Self { ... }
    fn from_utf8(err: Utf8Error) -> Self { ... }
}
Expand description

The operations required from a body stream’s Error type.

Provided Methods§

Source

fn from_str(str: &'static str) -> Self

Wrap a static string into this error type.

Goes through io::Error by default.

Source

fn from_string(string: String) -> Self

Wrap a dynamic string into this error type.

Goes through io::Error by default.

Source

fn from_utf8(err: Utf8Error) -> Self

Wrap a std::str::Utf8Error into this error type.

Goes through io::Error by default.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<E> StreamError for E
where E: From<Error>,