Trait NonPov

Source
pub trait NonPov: Sized {
    type Output: Pov<Output = Self>;

    // Required method
    fn pov(self, pov: Player) -> Self::Output;

    // Provided method
    fn flip(self) -> Self { ... }
}
Expand description

Trait to convert an absolute outcome to a relative one.

Required Associated Types§

Source

type Output: Pov<Output = Self>

Required Methods§

Source

fn pov(self, pov: Player) -> Self::Output

View this outcome from the POV of pov.

Provided Methods§

Source

fn flip(self) -> Self

Flip this outcome.

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.

Implementations on Foreign Types§

Source§

impl<I: NonPov> NonPov for Option<I>

Source§

type Output = Option<<I as NonPov>::Output>

Source§

fn pov(self, pov: Player) -> Option<I::Output>

Implementors§