stable_mir::ty

Type Alias PolyFnSig

Source
pub type PolyFnSig = Binder<FnSig>;

Aliased Type§

struct PolyFnSig {
    pub value: FnSig,
    pub bound_vars: Vec<BoundVariableKind>,
}

Fields§

§value: FnSig§bound_vars: Vec<BoundVariableKind>

Implementations§

Source§

impl PolyFnSig

Source

pub fn fn_ptr_abi(self) -> Result<FnAbi, Error>

Compute a FnAbi suitable for indirect calls, i.e. to fn pointers.

NB: this doesn’t handle virtual calls - those should use Instance::fn_abi instead, where the instance is an InstanceKind::Virtual.

Source§

impl<T> Binder<T>

Source

pub fn bind_with_vars(value: T, bound_vars: Vec<BoundVariableKind>) -> Self

Create a new binder with the given bound vars.

Source

pub fn dummy(value: T) -> Self

Create a new binder with no bounded variable.

Source

pub fn skip_binder(self) -> T

Source

pub fn map_bound_ref<F, U>(&self, f: F) -> Binder<U>
where F: FnOnce(&T) -> U,

Source

pub fn map_bound<F, U>(self, f: F) -> Binder<U>
where F: FnOnce(T) -> U,

Layout§

Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.

Size: 56 bytes

Trait Implementations

Source§

impl<T: Clone> Clone for Binder<T>

Source§

fn clone(&self) -> Binder<T>

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

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

Performs copy-assignment from source. Read more
Source§

impl<T: Debug> Debug for Binder<T>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<T: PartialEq> PartialEq for Binder<T>

Source§

fn eq(&self, other: &Binder<T>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<T> Serialize for Binder<T>
where T: Serialize,

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl<T: Visitable> Visitable for Binder<T>

Source§

fn super_visit<V: Visitor>(&self, visitor: &mut V) -> ControlFlow<V::Break>

Source§

fn visit<V: Visitor>(&self, visitor: &mut V) -> ControlFlow<V::Break>

Source§

impl<T: Eq> Eq for Binder<T>

Source§

impl<T> StructuralPartialEq for Binder<T>