pub struct HirMethod { /* private fields */ }Expand description
Represents a C++ method in HIR (DECY-200).
Implementations§
Source§impl HirMethod
impl HirMethod
Sourcepub fn new(
function: HirFunction,
is_const: bool,
is_static: bool,
is_virtual: bool,
) -> Self
pub fn new( function: HirFunction, is_const: bool, is_static: bool, is_virtual: bool, ) -> Self
Create a new HIR method.
Sourcepub fn function(&self) -> &HirFunction
pub fn function(&self) -> &HirFunction
Get the underlying function.
Sourcepub fn is_virtual(&self) -> bool
pub fn is_virtual(&self) -> bool
Whether this method is virtual (trait dispatch candidate).
Sourcepub fn operator_kind(&self) -> Option<HirCxxOperatorKind>
pub fn operator_kind(&self) -> Option<HirCxxOperatorKind>
Get the operator kind if this is an overloaded operator (DECY-208).
Trait Implementations§
impl StructuralPartialEq for HirMethod
Auto Trait Implementations§
impl Freeze for HirMethod
impl RefUnwindSafe for HirMethod
impl Send for HirMethod
impl Sync for HirMethod
impl Unpin for HirMethod
impl UnsafeUnpin for HirMethod
impl UnwindSafe for HirMethod
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