pub struct DocumentSource { /* private fields */ }Implementations§
Source§impl DocumentSource
impl DocumentSource
pub fn new(text: impl Into<Arc<str>>, source: SourceDescriptor) -> Self
pub fn source(&self) -> &SourceDescriptor
pub fn text(&self) -> &str
pub fn source_map(&self) -> &SourceMap
pub fn diagrams(&self) -> &[DocumentDiagram]
pub fn remap_span_to_document( &self, diagram: &DocumentDiagram, span: DiagnosticSpan, ) -> Option<DiagnosticSpan>
pub fn remap_diagnostic_to_document( &self, diagram: &DocumentDiagram, diagnostic: AnalysisDiagnostic, ) -> AnalysisDiagnostic
Trait Implementations§
Source§impl Clone for DocumentSource
impl Clone for DocumentSource
Source§fn clone(&self) -> DocumentSource
fn clone(&self) -> DocumentSource
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for DocumentSource
impl RefUnwindSafe for DocumentSource
impl Send for DocumentSource
impl Sync for DocumentSource
impl Unpin for DocumentSource
impl UnsafeUnpin for DocumentSource
impl UnwindSafe for DocumentSource
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