pub struct Location<'c> { /* private fields */ }
Expand description
A location
Implementations§
source§impl<'c> Location<'c>
impl<'c> Location<'c>
sourcepub fn new(
context: &'c Context,
filename: &str,
line: usize,
column: usize
) -> Self
pub fn new( context: &'c Context, filename: &str, line: usize, column: usize ) -> Self
Creates a location with a filename and line and column numbers.
sourcepub fn fused(
context: &'c Context,
locations: &[Self],
attribute: Attribute<'_>
) -> Self
pub fn fused( context: &'c Context, locations: &[Self], attribute: Attribute<'_> ) -> Self
Creates a fused location.
sourcepub fn name(context: &'c Context, name: &str, child: Location<'_>) -> Self
pub fn name(context: &'c Context, name: &str, child: Location<'_>) -> Self
Creates a name location.
sourcepub fn call_site(callee: Location<'_>, caller: Location<'_>) -> Self
pub fn call_site(callee: Location<'_>, caller: Location<'_>) -> Self
Creates a call site location.
sourcepub fn context(&self) -> ContextRef<'c>
pub fn context(&self) -> ContextRef<'c>
Gets a context.
sourcepub unsafe fn from_raw(raw: MlirLocation) -> Self
pub unsafe fn from_raw(raw: MlirLocation) -> Self
sourcepub const fn to_raw(self) -> MlirLocation
pub const fn to_raw(self) -> MlirLocation
Converts a location into a raw object.
Trait Implementations§
source§impl<'c> PartialEq for Location<'c>
impl<'c> PartialEq for Location<'c>
impl<'c> Copy for Location<'c>
Auto Trait Implementations§
impl<'c> RefUnwindSafe for Location<'c>
impl<'c> !Send for Location<'c>
impl<'c> !Sync for Location<'c>
impl<'c> Unpin for Location<'c>
impl<'c> UnwindSafe for Location<'c>
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