Struct symbolic_sourcemap::SourceView
[−]
[src]
pub struct SourceView<'a> { /* fields omitted */ }Represents JS sourcecode.
Methods
impl<'a> SourceView<'a>[src]
fn new(source: &'a str) -> SourceView<'a>[src]
Returns a view from a given source string.
fn from_string(source: String) -> SourceView<'static>[src]
Creates a view from a string.
fn from_bytes(source: &'a [u8]) -> SourceView<'a>[src]
Creates a soruce view from bytes ignoring utf-8 errors.
fn as_str(&self) -> &str[src]
Returns the embedded source a string.
fn get_line(&self, idx: u32) -> Option<&str>[src]
Returns a specific line.
fn line_count(&self) -> usize[src]
Returns the number of lines.