[−][src]Struct rls_vfs::Vfs
Methods
impl<U> Vfs<U>
[src]
pub fn new() -> Vfs<U>
[src]
Creates a new, empty VFS.
pub fn file_saved(&self, path: &Path) -> Result<(), Error>
[src]
Indicate that the current file as known to the VFS has been written to disk.
pub fn flush_file(&self, path: &Path) -> Result<(), Error>
[src]
Removes a file from the VFS. Does not check if the file is synced with the disk. Does not check if the file exists.
pub fn file_is_synced(&self, path: &Path) -> Result<bool, Error>
[src]
pub fn on_changes(&self, changes: &[Change]) -> Result<(), Error>
[src]
Record a set of changes to the VFS.
pub fn get_cached_files(&self) -> HashMap<PathBuf, String>
[src]
Return all files in the VFS.
pub fn get_changes(&self) -> HashMap<PathBuf, String>
[src]
pub fn has_changes(&self) -> bool
[src]
Returns true if the VFS contains any changed files.
pub fn set_file(&self, path: &Path, text: &str)
[src]
pub fn load_file(&self, path: &Path) -> Result<FileContents, Error>
[src]
pub fn load_line(
&self,
path: &Path,
line: Row<ZeroIndexed>
) -> Result<String, Error>
[src]
&self,
path: &Path,
line: Row<ZeroIndexed>
) -> Result<String, Error>
pub fn load_lines(
&self,
path: &Path,
line_start: Row<ZeroIndexed>,
line_end: Row<ZeroIndexed>
) -> Result<String, Error>
[src]
&self,
path: &Path,
line_start: Row<ZeroIndexed>,
line_end: Row<ZeroIndexed>
) -> Result<String, Error>
pub fn load_span(&self, span: Span<ZeroIndexed>) -> Result<String, Error>
[src]
pub fn for_each_line<F>(&self, path: &Path, f: F) -> Result<(), Error> where
F: FnMut(&str, usize) -> Result<(), Error>,
[src]
F: FnMut(&str, usize) -> Result<(), Error>,
pub fn write_file(&self, path: &Path) -> Result<(), Error>
[src]
pub fn set_user_data(&self, path: &Path, data: Option<U>) -> Result<(), Error>
[src]
pub fn with_user_data<F, R>(&self, path: &Path, f: F) -> Result<R, Error> where
F: FnOnce(Result<(Option<&str>, &mut U), Error>) -> Result<R, Error>,
[src]
F: FnOnce(Result<(Option<&str>, &mut U), Error>) -> Result<R, Error>,
pub fn ensure_user_data<F>(&self, path: &Path, f: F) -> Result<(), Error> where
F: FnOnce(Option<&str>) -> Result<U, Error>,
[src]
F: FnOnce(Option<&str>) -> Result<U, Error>,
pub fn clear(&self)
[src]
Auto Trait Implementations
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
🔬 This is a nightly-only experimental API. (
try_from
)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> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
🔬 This is a nightly-only experimental API. (
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,