Skip to main content

WorldExt

Trait WorldExt 

Source
pub trait WorldExt {
    // Required method
    fn range(&self, span: impl Into<DiagSpan>) -> Option<Range<usize>>;
}
Expand description

Helper methods on World implementations.

Required Methods§

Source

fn range(&self, span: impl Into<DiagSpan>) -> Option<Range<usize>>

Get the byte range for a span.

Returns None if the Span does not point into any file.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<T: World + ?Sized> WorldExt for T