Struct Shifted

Source
pub struct Shifted<'b, A: ?Sized> { /* private fields */ }
Expand description

A “shifted” version of a substitution, used internally to assure that substitution is capture-avoiding.

Trait Implementations§

Source§

impl<'b, A: ?Sized> Clone for Shifted<'b, A>

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 · Source§

const fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

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

Source§

type Inner = A

Source§

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

Source§

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

Source§

type Error = <A as Substitution<'a>>::Error

Some, but not all, substitutions are fallible (i.e. may reveal latent misbehaviour in the type they are being applied to), so any given Substitution can provide its own Substitution::Error type. Read more
Source§

fn subst_bvar(&self, i: u32) -> Result<Option<Defined<'a>>, Self::Error>

Any substitution should define whether a given bound variable should be substituted, and if so with what.
Source§

fn subst_evar(&self, o: u32, i: u32) -> Result<Option<Defined<'a>>, Self::Error>

Any substitution should define whether a given existential variable should be substituted, and if so with what.
Source§

fn subst_uvar(&self, o: u32, i: u32) -> Result<Option<Defined<'a>>, Self::Error>

Any substitution should define whether a given universal variable should be substituted, and if so with what.
Source§

fn record_fields( &self, rfs: &[RecordField<'a>], ) -> Result<Vec<RecordField<'a>>, Self::Error>

Source§

fn variant_cases( &self, vcs: &[VariantCase<'a>], ) -> Result<Vec<VariantCase<'a>>, Self::Error>

Source§

fn value_option( &self, vt: &Option<Value<'a>>, ) -> Result<Option<Value<'a>>, Self::Error>

Source§

fn value(&self, vt: &Value<'a>) -> Result<Value<'a>, Self::Error>

Source§

fn param(&self, pt: &Param<'a>) -> Result<Param<'a>, Self::Error>

Source§

fn params(&self, pts: &Vec<Param<'a>>) -> Result<Vec<Param<'a>>, Self::Error>

Source§

fn result(&self, rt: &Result<'a>) -> Result<Result<'a>, Self::Error>

Source§

fn func(&self, ft: &Func<'a>) -> Result<Func<'a>, Self::Error>

Source§

fn var(&self, tv: &Tyvar) -> Result<Option<Defined<'a>>, Self::Error>

Source§

fn handleable(&self, h: &Handleable) -> Result<Defined<'a>, Self::Error>

Source§

fn handleable_(&self, h: &Handleable) -> Result<Handleable, Self::Error>

Source§

fn defined(&self, dt: &Defined<'a>) -> Result<Defined<'a>, Self::Error>

Source§

fn type_bound(&self, tb: &TypeBound<'a>) -> Result<TypeBound<'a>, Self::Error>

Source§

fn bounded_tyvar( &self, btv: &BoundedTyvar<'a>, ) -> Result<BoundedTyvar<'a>, Self::Error>

Source§

fn extern_desc( &self, ed: &ExternDesc<'a>, ) -> Result<ExternDesc<'a>, Self::Error>

Source§

fn extern_decl( &self, ed: &ExternDecl<'a>, ) -> Result<ExternDecl<'a>, Self::Error>

Source§

fn instance(&self, it: &Instance<'a>) -> Result<Instance<'a>, Self::Error>

Source§

fn qualified_instance( &self, qit: &QualifiedInstance<'a>, ) -> Result<QualifiedInstance<'a>, Self::Error>

Source§

fn component(&self, ct: &Component<'a>) -> Result<Component<'a>, Self::Error>

Auto Trait Implementations§

§

impl<'b, A> Freeze for Shifted<'b, A>
where A: ?Sized,

§

impl<'b, A> RefUnwindSafe for Shifted<'b, A>
where A: RefUnwindSafe + ?Sized,

§

impl<'b, A> Send for Shifted<'b, A>
where A: Sync + ?Sized,

§

impl<'b, A> Sync for Shifted<'b, A>
where A: Sync + ?Sized,

§

impl<'b, A> Unpin for Shifted<'b, A>
where A: ?Sized,

§

impl<'b, A> UnwindSafe for Shifted<'b, A>
where A: RefUnwindSafe + ?Sized,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.