Struct symbolic_sourcemap::SourceView
source · [−]pub struct SourceView<'a> { /* private fields */ }
Expand description
Represents JS source code.
Implementations
sourceimpl<'a> SourceView<'a>
impl<'a> SourceView<'a>
sourcepub fn from_string(source: String) -> Self
pub fn from_string(source: String) -> Self
Creates a view from a string.
sourcepub fn from_slice(source: &'a [u8]) -> Self
pub fn from_slice(source: &'a [u8]) -> Self
Creates a soruce view from bytes ignoring utf-8 errors.
sourcepub fn line_count(&self) -> usize
pub fn line_count(&self) -> usize
Returns the number of lines.
Auto Trait Implementations
impl<'a> !RefUnwindSafe for SourceView<'a>
impl<'a> !Send for SourceView<'a>
impl<'a> !Sync for SourceView<'a>
impl<'a> Unpin for SourceView<'a>
impl<'a> UnwindSafe for SourceView<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more