Trait thfmr_util::DropResult[][src]

pub trait DropResult<T, E> {
    fn drop_result(self) -> Result<(), E>;
}
Expand description

A trait to define the ability to drop a result.

This can be used when the return type of a core::result::Result is not interesting. In particular, this can be used with [try_join!] which returns a core::result::Result with a tuple of all original core::result::Result values. When the original core::result::Results were all (), this trait can be used to simplify the return value by calling DropResult::drop_result

Required methods

fn drop_result(self) -> Result<(), E>[src]

Expand description

Drops the result from a core::result::Result, turning it into ()

Loading content...

Implementations on Foreign Types

impl<T, E> DropResult<T, E> for Result<T, E>[src]

Implementation of DropResult for all core::result::Result types

fn drop_result(self) -> Result<(), E>[src]

Drops the result from a core::result::Result, turning it into ()

Loading content...

Implementors

Loading content...