pub struct DefaultSourceManager(/* private fields */);Trait Implementations§
Source§impl Clone for DefaultSourceManager
impl Clone for DefaultSourceManager
Source§impl Debug for DefaultSourceManager
impl Debug for DefaultSourceManager
Source§impl Default for DefaultSourceManager
impl Default for DefaultSourceManager
Source§fn default() -> DefaultSourceManager
fn default() -> DefaultSourceManager
Returns the “default value” for a type. Read more
Source§impl SourceManager for DefaultSourceManager
impl SourceManager for DefaultSourceManager
Source§fn load_from_raw_parts(
&self,
group: SourceGroup,
uri: FileName,
content: SourceContent,
) -> Arc<SourceFile>
fn load_from_raw_parts( &self, group: SourceGroup, uri: FileName, content: SourceContent, ) -> Arc<SourceFile>
Load content into this SourceManager from raw SourceFile components
Source§fn update(
&self,
id: SourceId,
text: String,
range: Option<Selection>,
version: i32,
) -> Result<(), SourceManagerError>
fn update( &self, id: SourceId, text: String, range: Option<Selection>, version: i32, ) -> Result<(), SourceManagerError>
Update the source file corresponding to
id after being notified of a change event. Read moreSource§fn get(&self, id: SourceId) -> Result<Arc<SourceFile>, SourceManagerError>
fn get(&self, id: SourceId) -> Result<Arc<SourceFile>, SourceManagerError>
Get the SourceFile corresponding to
idSource§fn get_by_uri(&self, uri: &FileName) -> Option<Arc<SourceFile>>
fn get_by_uri(&self, uri: &FileName) -> Option<Arc<SourceFile>>
Get the most recent SourceFile whose URI is
uriSource§fn find(&self, uri: &FileName) -> Option<SourceId>
fn find(&self, uri: &FileName) -> Option<SourceId>
Search for a source file whose URI is
uri, and return its SourceId if found.Source§fn file_line_col_to_span(&self, loc: FileLineCol) -> Option<SourceSpan>
fn file_line_col_to_span(&self, loc: FileLineCol) -> Option<SourceSpan>
Convert a FileLineCol to an equivalent SourceSpan, if the referenced file is available
Source§fn file_line_col(
&self,
span: SourceSpan,
) -> Result<FileLineCol, SourceManagerError>
fn file_line_col( &self, span: SourceSpan, ) -> Result<FileLineCol, SourceManagerError>
Convert a SourceSpan to an equivalent FileLineCol, if the span is valid
Source§fn location_to_span(&self, loc: Location) -> Option<SourceSpan>
fn location_to_span(&self, loc: Location) -> Option<SourceSpan>
Convert a Location to an equivalent SourceSpan, if the referenced file is available
Source§fn location(&self, span: SourceSpan) -> Result<Location, SourceManagerError>
fn location(&self, span: SourceSpan) -> Result<Location, SourceManagerError>
Convert a SourceSpan to an equivalent Location, if the span is valid
Source§fn source(&self, id: SourceId) -> Result<&str, SourceManagerError>
fn source(&self, id: SourceId) -> Result<&str, SourceManagerError>
Get the source associated with
id as a string sliceSource§fn source_slice(&self, span: SourceSpan) -> Result<&str, SourceManagerError>
fn source_slice(&self, span: SourceSpan) -> Result<&str, SourceManagerError>
Get the source corresponding to
span as a string sliceSource§fn is_manager_of(&self, file: &SourceFile) -> bool
fn is_manager_of(&self, file: &SourceFile) -> bool
Returns true if
file is managed by this source managerSource§fn copy_into(&self, file: &SourceFile) -> Arc<SourceFile>
fn copy_into(&self, file: &SourceFile) -> Arc<SourceFile>
Copies
file into this source manager (if not already managed by this manager). Read morefn load_argument(&self, name: &'static str, content: String) -> Arc<SourceFile>
Source§fn load(
&self,
lang: SourceLanguage,
name: FileName,
content: String,
) -> Arc<SourceFile>
fn load( &self, lang: SourceLanguage, name: FileName, content: String, ) -> Arc<SourceFile>
Auto Trait Implementations§
impl !Freeze for DefaultSourceManager
impl !RefUnwindSafe for DefaultSourceManager
impl Send for DefaultSourceManager
impl Sync for DefaultSourceManager
impl Unpin for DefaultSourceManager
impl UnsafeUnpin for DefaultSourceManager
impl UnwindSafe for DefaultSourceManager
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> SourceManagerExt for Twhere
T: SourceManager + ?Sized,
impl<T> SourceManagerExt for Twhere
T: SourceManager + ?Sized,
Source§fn load_file(&self, path: &Path) -> Result<Arc<SourceFile>, SourceManagerError>
fn load_file(&self, path: &Path) -> Result<Arc<SourceFile>, SourceManagerError>
Load the content of
path into this SourceManager