pub struct SourceLocationFactory { /* private fields */ }Implementations§
Source§impl SourceLocationFactory
impl SourceLocationFactory
Sourcepub fn internal(src: &str) -> Self
pub fn internal(src: &str) -> Self
constructs a SourceRangeFactory used for internally generated code (e.g. builtins)
Sourcepub fn for_source(source_code: &SourceCode) -> Self
pub fn for_source(source_code: &SourceCode) -> Self
constructs a SourceRangeFactory used to construct SourceRanes that point into the given source
Sourcepub fn create_range(&self, range: Range<usize>) -> SourceLocation
pub fn create_range(&self, range: Range<usize>) -> SourceLocation
creates a new SourceRange using the factory’s file_name
pub fn create_block_location(&self, local_id: usize) -> SourceLocation
pub fn create_file_only_location(&self) -> SourceLocation
pub fn create_range_to_end_of_line( &self, line: usize, column: usize, ) -> SourceLocation
Trait Implementations§
Source§impl Clone for SourceLocationFactory
impl Clone for SourceLocationFactory
Source§fn clone(&self) -> SourceLocationFactory
fn clone(&self) -> SourceLocationFactory
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Default for SourceLocationFactory
impl Default for SourceLocationFactory
Source§fn default() -> SourceLocationFactory
fn default() -> SourceLocationFactory
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for SourceLocationFactory
impl RefUnwindSafe for SourceLocationFactory
impl Send for SourceLocationFactory
impl Sync for SourceLocationFactory
impl Unpin for SourceLocationFactory
impl UnsafeUnpin for SourceLocationFactory
impl UnwindSafe for SourceLocationFactory
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