[−][src]Struct symbolic_sourcemap::SourceView
Represents JS source code.
Implementations
impl<'a> SourceView<'a>
[src]
pub fn new(source: &'a str) -> Self
[src]
Creates a view from a string.
pub fn from_string(source: String) -> Self
[src]
Creates a view from a string.
pub fn from_slice(source: &'a [u8]) -> Self
[src]
Creates a soruce view from bytes ignoring utf-8 errors.
pub fn as_str(&self) -> &str
[src]
Returns the embedded source a string.
pub fn get_line(&self, idx: u32) -> Option<&str>
[src]
Returns a specific line.
pub fn line_count(&self) -> usize
[src]
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
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,