pub struct LoggerSourceLocation {
pub start: LoggerPosition,
pub end: LoggerPosition,
pub filename: Option<String>,
pub identifier_name: Option<String>,
}Expand description
Source location with index and filename fields for logger event serialization. Matches the Babel SourceLocation format that the TS compiler emits in logger events.
Fields§
§start: LoggerPosition§end: LoggerPosition§filename: Option<String>§identifier_name: Option<String>Implementations§
Source§impl LoggerSourceLocation
impl LoggerSourceLocation
Sourcepub fn from_loc(
loc: &SourceLocation,
filename: Option<&str>,
start_index: Option<u32>,
end_index: Option<u32>,
) -> Self
pub fn from_loc( loc: &SourceLocation, filename: Option<&str>, start_index: Option<u32>, end_index: Option<u32>, ) -> Self
Create from a diagnostics SourceLocation, adding index and filename.
Sourcepub fn from_loc_simple(loc: &SourceLocation) -> Self
pub fn from_loc_simple(loc: &SourceLocation) -> Self
Create from a diagnostics SourceLocation without index or filename.
Trait Implementations§
Source§impl Clone for LoggerSourceLocation
impl Clone for LoggerSourceLocation
Source§fn clone(&self) -> LoggerSourceLocation
fn clone(&self) -> LoggerSourceLocation
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 Debug for LoggerSourceLocation
impl Debug for LoggerSourceLocation
Auto Trait Implementations§
impl Freeze for LoggerSourceLocation
impl RefUnwindSafe for LoggerSourceLocation
impl Send for LoggerSourceLocation
impl Sync for LoggerSourceLocation
impl Unpin for LoggerSourceLocation
impl UnsafeUnpin for LoggerSourceLocation
impl UnwindSafe for LoggerSourceLocation
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