Trait Shiftable

Source
pub trait Shiftable<'a> {
    type Inner: ?Sized + Substitution<'a>;

    // Required method
    fn shifted<'c>(&'c self) -> Shifted<'c, Self::Inner>;
}
Expand description

A substitution that can be converted into a Shifted substitution. All types other than Shifted itself should implement this with the obvious option of

impl<'a> Shiftable<'a> for A {
    type Inner = Self;
    fn shifted<'b>(&'b self) -> Shifted<'b, Self::Inner> { Shifted::new(self) }
}

Unfortunately, it is not reasonably possible to provide this automatically without specialization.

Required Associated Types§

Required Methods§

Source

fn shifted<'c>(&'c self) -> Shifted<'c, Self::Inner>

Implementors§

Source§

impl<'a> Shiftable<'a> for Closing

Source§

impl<'a> Shiftable<'a> for Opening

Source§

impl<'a, 'b, A: ?Sized + Substitution<'a>> Shiftable<'a> for Shifted<'b, A>

Source§

type Inner = A

Source§

impl<'c, 'p, 'a> Shiftable<'a> for Innerize<'c, 'p, 'a>

Source§

type Inner = Innerize<'c, 'p, 'a>