Trait Residual

trait Residual<O>: Sized

Allows retrieving the canonical type implementing Try that has this type as its residual and allows it to hold an O as its output.

If you think of the Try trait as splitting a type into its Try::Output and Try::Residual components, this allows putting them back together.

For example, Result<T, E>: Try<Output = T, Residual = Result<Infallible, E>>, and in the other direction, <Result<Infallible, E> as Residual<T>>::TryType = Result<T, E>.

Associated Types

type TryType: TraitBound { trait_: Path { path: "Try", id: Id(12508), args: Some(AngleBracketed { args: [], constraints: [AssocItemConstraint { name: "Output", args: None, binding: Equality(Type(Generic("O"))) }, AssocItemConstraint { name: "Residual", args: None, binding: Equality(Type(Generic("Self"))) }] }) }, generic_params: [], modifier: MaybeConst }

The "return" type of this meta-function.

Implementors