[−][src]Struct rslint_cli::JsFile
A structure representing either a concrete (in-disk) or virtual (temporary/non-disk) js or mjs file.
Fields
source: String
name: String
The name of the file.
path: Option<PathBuf>
The path in disk if this is a concrete file.
id: usize
The codespan id assigned to this file used to refer back to it.
kind: JsFileKind
Whether this is a js or mjs file (script vs module).
line_starts: Vec<usize>
The cached line start locations in this file.
Implementations
impl JsFile
[src]
pub fn new_concrete(source: String, path: PathBuf) -> Self
[src]
pub fn update_src(&mut self, new: String)
[src]
pub fn line_starts<'a>(source: &'a str) -> impl Iterator<Item = usize> + 'a
[src]
pub fn line_start(&self, line_index: usize) -> Option<usize>
[src]
pub fn line_index(&self, byte_index: usize) -> usize
[src]
pub fn line_col_to_index(&self, line: usize, column: usize) -> Option<usize>
[src]
Trait Implementations
impl Clone for JsFile
[src]
impl Debug for JsFile
[src]
impl Eq for JsFile
[src]
impl Hash for JsFile
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl PartialEq<JsFile> for JsFile
[src]
impl StructuralEq for JsFile
[src]
impl StructuralPartialEq for JsFile
[src]
Auto Trait Implementations
impl RefUnwindSafe for JsFile
impl Send for JsFile
impl Sync for JsFile
impl Unpin for JsFile
impl UnwindSafe for JsFile
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> CallHasher for T where
T: Hash,
T: Hash,
impl<T> DynClone for T where
T: Clone,
[src]
T: Clone,
fn __clone_box(&self, Private) -> *mut ()
[src]
impl<T> Erasable for T
unsafe fn unerase(this: NonNull<Erased>) -> NonNull<T>
const ACK_1_1_0: bool
fn erase(this: NonNull<Self>) -> NonNull<Erased>
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
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>,