Trait cocaine::protocol::Flatten [−][src]
An extension trait for results, that contain error types itself, to be able to flatten the result of deserialization and protocol errors.
For example when deserializing a Primitive
result either deserialization or service error can
occur, which results in Result<Result<T, protocol::Error>, Error>
type. To avoid explicit
double matching the inner result can be flatten into the outer one.
Associated Types
type Item
The success value type.
Required Methods
fn flatten(self) -> Result<Self::Item, Error>
Flattens the inner protocol, possibly containing an error type into the common result type.
Implementations on Foreign Types
impl<T, E> Flatten for Result<Result<T, E>, Error> where
E: Into<Error>,
[src]
impl<T, E> Flatten for Result<Result<T, E>, Error> where
E: Into<Error>,
impl<T> Flatten for Result<Streaming<T>, Error>
[src]
impl<T> Flatten for Result<Streaming<T>, Error>