Struct rupta::mir::function::FunctionReference
source · pub struct FunctionReference<'tcx> {
pub def_id: DefId,
pub generic_args: Vec<GenericArgE<'tcx>>,
pub promoted: Option<Promoted>,
}Expand description
Information that identifies a function instance.
Fields§
§def_id: DefIdThe crate specific key that is used to identify the function in the current crate.
generic_args: Vec<GenericArgE<'tcx>>The generic argument types with which the referenced function was instantiated, if generic.
promoted: Option<Promoted>Promoteds do not have their own DefId. The body references promoteds by the DefId and the mir::Promoted index.
Implementations§
source§impl<'tcx> FunctionReference<'tcx>
impl<'tcx> FunctionReference<'tcx>
pub fn new_function_reference( def_id: DefId, generic_args: Vec<GenericArgE<'tcx>> ) -> Rc<FunctionReference<'tcx>>
pub fn new_promoted_reference( def_id: DefId, generic_args: Vec<GenericArgE<'tcx>>, promoted: Promoted ) -> Rc<FunctionReference<'tcx>>
Trait Implementations§
source§impl<'tcx> Clone for FunctionReference<'tcx>
impl<'tcx> Clone for FunctionReference<'tcx>
source§fn clone(&self) -> FunctionReference<'tcx>
fn clone(&self) -> FunctionReference<'tcx>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl<'tcx> Debug for FunctionReference<'tcx>
impl<'tcx> Debug for FunctionReference<'tcx>
source§impl<'tcx> Hash for FunctionReference<'tcx>
impl<'tcx> Hash for FunctionReference<'tcx>
source§impl<'tcx> Ord for FunctionReference<'tcx>
impl<'tcx> Ord for FunctionReference<'tcx>
source§fn cmp(&self, other: &FunctionReference<'tcx>) -> Ordering
fn cmp(&self, other: &FunctionReference<'tcx>) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl<'tcx> PartialEq for FunctionReference<'tcx>
impl<'tcx> PartialEq for FunctionReference<'tcx>
source§fn eq(&self, other: &FunctionReference<'tcx>) -> bool
fn eq(&self, other: &FunctionReference<'tcx>) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl<'tcx> PartialOrd for FunctionReference<'tcx>
impl<'tcx> PartialOrd for FunctionReference<'tcx>
source§fn partial_cmp(&self, other: &FunctionReference<'tcx>) -> Option<Ordering>
fn partial_cmp(&self, other: &FunctionReference<'tcx>) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self and other) and is used by the <=
operator. Read moresource§impl<'tcx> ToString for FunctionReference<'tcx>
impl<'tcx> ToString for FunctionReference<'tcx>
impl<'tcx> Eq for FunctionReference<'tcx>
impl<'tcx> StructuralPartialEq for FunctionReference<'tcx>
Auto Trait Implementations§
impl<'tcx> !RefUnwindSafe for FunctionReference<'tcx>
impl<'tcx> Send for FunctionReference<'tcx>
impl<'tcx> Sync for FunctionReference<'tcx>
impl<'tcx> Unpin for FunctionReference<'tcx>
impl<'tcx> !UnwindSafe for FunctionReference<'tcx>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.