pub struct SourceFile {
pub id: u32,
pub file: Option<Rc<str>>,
pub line_starts: RefCell<LineMap>,
pub content: RefCell<Rc<str>>,
/* private fields */
}Expand description
source file
Fields§
§id: u32§file: Option<Rc<str>>§line_starts: RefCell<LineMap>§content: RefCell<Rc<str>>content: shared with the tokenizer (no copy). appended by the stream tokenizer
Implementations§
Source§impl SourceFile
impl SourceFile
pub fn new(content: Rc<str>, lines: Vec<u32>, file: Option<Rc<str>>) -> Rc<Self>
Sourcepub fn set_input_source_map(&self, input_source_map: Option<&str>)
pub fn set_input_source_map(&self, input_source_map: Option<&str>)
set the input source map (a source map object as json, or a data url / json string)
pub fn set_input_source_map_object(&self, map: Option<SourceMap>)
pub fn get_input_source_map(&self) -> Option<Rc<SourceMap>>
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for SourceFile
impl !RefUnwindSafe for SourceFile
impl !Send for SourceFile
impl !Sync for SourceFile
impl Forget for SourceFile
impl Move for SourceFile
impl Unpin for SourceFile
impl UnsafeUnpin for SourceFile
impl UnwindSafe for SourceFile
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