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§
Sourcefn from_str(str: &'static str) -> Self
fn from_str(str: &'static str) -> Self
Wrap a static string into this error type.
Goes through io::Error
by default.
Sourcefn from_string(string: String) -> Self
fn from_string(string: String) -> Self
Wrap a dynamic string 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", so this trait is not object safe.