pub struct SourceReference<FileId: Copy + Default> {
pub file: FileId,
pub line: usize,
pub column: usize,
}Expand description
A SourceReference is a reference to a location in a file.
Fields§
§file: FileIdThe file this SourceReference refers to.
line: usizeThe line number of this SourceReference.
column: usizeThe column number of this SourceReference.
Implementations§
Source§impl<FileID: Copy + Default> SourceReference<FileID>
impl<FileID: Copy + Default> SourceReference<FileID>
Sourcepub fn display<'a, F: File<SourceRefID = FileID>, FS: FileSystem<File = F>>(
&'a self,
fs: &'a FS,
) -> impl Display + 'a
pub fn display<'a, F: File<SourceRefID = FileID>, FS: FileSystem<File = F>>( &'a self, fs: &'a FS, ) -> impl Display + 'a
Yields a Displayable version of this SourceReference.
Trait Implementations§
Source§impl<FileId: Clone + Copy + Default> Clone for SourceReference<FileId>
impl<FileId: Clone + Copy + Default> Clone for SourceReference<FileId>
Source§fn clone(&self) -> SourceReference<FileId>
fn clone(&self) -> SourceReference<FileId>
Returns a duplicate 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 moreimpl<FileId: Copy + Copy + Default> Copy for SourceReference<FileId>
Auto Trait Implementations§
impl<FileId> Freeze for SourceReference<FileId>where
FileId: Freeze,
impl<FileId> RefUnwindSafe for SourceReference<FileId>where
FileId: RefUnwindSafe,
impl<FileId> Send for SourceReference<FileId>where
FileId: Send,
impl<FileId> Sync for SourceReference<FileId>where
FileId: Sync,
impl<FileId> Unpin for SourceReference<FileId>where
FileId: Unpin,
impl<FileId> UnsafeUnpin for SourceReference<FileId>where
FileId: UnsafeUnpin,
impl<FileId> UnwindSafe for SourceReference<FileId>where
FileId: UnwindSafe,
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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<ET, Err, A> IntoErr<ET, Err> for Awhere
ET: EngineTypes,
Err: From<A>,
impl<ET, Err, A> IntoErr<ET, Err> for Awhere
ET: EngineTypes,
Err: From<A>,
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().