#[non_exhaustive]pub enum CallTarget {
Direct(FuncId),
Indirect {
sig: SigId,
callee: Value,
},
}Expand description
What a call calls.
§Examples
use ir_lang::{CallTarget, FuncId};
let t = CallTarget::Direct(FuncId::from_u32(0));
assert!(matches!(t, CallTarget::Direct(_)));Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Direct(FuncId)
A function declared in the module (defined or imported).
Indirect
The function whose address is callee (a ptr), which must have signature
sig.
Trait Implementations§
Source§impl Clone for CallTarget
impl Clone for CallTarget
impl Copy for CallTarget
Source§impl Debug for CallTarget
impl Debug for CallTarget
impl Eq for CallTarget
Source§impl Hash for CallTarget
impl Hash for CallTarget
Source§impl PartialEq for CallTarget
impl PartialEq for CallTarget
impl StructuralPartialEq for CallTarget
Auto Trait Implementations§
impl Freeze for CallTarget
impl RefUnwindSafe for CallTarget
impl Send for CallTarget
impl Sync for CallTarget
impl Unpin for CallTarget
impl UnsafeUnpin for CallTarget
impl UnwindSafe for CallTarget
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