Trait eso::maybe::Relax[][src]

pub trait Relax<Into>: Maybe {
    fn relax(self) -> Into;
}
Expand description

Safe conversion between Maybes.

Casting between An and No is safe in the following combinations:

  • An An<A> may only be cast into itself.

  • A No<A> may be cast into any An<B> or any other No<B>, since the No<A> cannot exist in the first place, so the cast can never actually happen.

Required methods

fn relax(self) -> Into[src]

Cast self into another type of Maybe.

See the trait documentation for the rules.

Implementors

impl<A> Relax<An<A>> for An<A>[src]

fn relax(self) -> An<A>[src]

impl<A, B> Relax<An<B>> for No<A>[src]

fn relax(self) -> An<B>[src]

impl<A, B> Relax<No<B>> for No<A>[src]

fn relax(self) -> No<B>[src]