Skip to main content

Lift

Trait Lift 

pub trait Lift: Sized {
    type View<'a, R: Scalar>
       where Self: 'a;

    // Required methods
    fn view<R: Scalar>(&self) -> Self::View<'_, R>;
    fn view_with_slice<'a, R: Scalar>(
        &'a self,
        rest: &mut &'a [R],
    ) -> Self::View<'a, R>;
    fn view_seeding<R: Scalar + Seedable>(
        &self,
        seed: &mut Option<usize>,
    ) -> Self::View<'_, R>;
}
Expand description

The mode lift every closed family set provides: a view type per mode, and the three ways of producing one.

Implemented for each set by the crate-private closed_set! macro, which forwards to the inherent lifts it generates. Not object-safe — view is generic over the mode — which is why the sets are closed enums rather than trait objects, and why this is a bound for generic code rather than a dyn vocabulary.

Required Associated Types§

type View<'a, R: Scalar> where Self: 'a

This family lifted into mode R, borrowing the storage for 'a.

Required Methods§

fn view<R: Scalar>(&self) -> Self::View<'_, R>

This family lifted into mode R.

fn view_with_slice<'a, R: Scalar>( &'a self, rest: &mut &'a [R], ) -> Self::View<'a, R>

One step of a substituted walk: this family takes its own parameters off the front of rest, then its parts take theirs, in parameter_owners order.

fn view_seeding<R: Scalar + Seedable>( &self, seed: &mut Option<usize>, ) -> Self::View<'_, R>

One step of a seeded walk: this family consumes the seed if it falls among its own parameters, and passes it on to its parts otherwise.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

§

impl Lift for Curve

§

type View<'a, R: Scalar> = CurveView<'a, R> where Self: 'a

§

impl Lift for Inflation

§

type View<'a, R: Scalar> = InflationView<'a, R> where Self: 'a

§

impl Lift for Survival

§

type View<'a, R: Scalar> = SurvivalView<'a, R> where Self: 'a