Skip to main content

Issue

Trait Issue 

Source
pub trait Issue:
    Send
    + Sync
    + NonLocalValue
    + ValueDebug {
    // Required methods
    fn file_path<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<FileSystemPath>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn stage(&self) -> IssueStage;
    fn title<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<StyledString>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;

    // Provided methods
    fn severity(&self) -> IssueSeverity { ... }
    fn description<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<Option<StyledString>>> + Send + 'async_trait>>
       where Self: Sync + 'async_trait,
             'life0: 'async_trait { ... }
    fn detail<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<Option<StyledString>>> + Send + 'async_trait>>
       where Self: Sync + 'async_trait,
             'life0: 'async_trait { ... }
    fn documentation_link(&self) -> RcStr { ... }
    fn source(&self) -> Option<IssueSource> { ... }
    fn additional_sources<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<AdditionalIssueSource>>> + Send + 'async_trait>>
       where Self: Sync + 'async_trait,
             'life0: 'async_trait { ... }
}

Required Methods§

Source

fn file_path<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<FileSystemPath>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

The file path that generated the issue, displayed to the user as message header.

Source

fn stage(&self) -> IssueStage

The stage of the compilation process at which the issue occurred. This is used to sort issues.

Source

fn title<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<StyledString>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

The issue title should be descriptive of the issue, but should be a single line. This is displayed to the user directly under the issue header.

Provided Methods§

Source

fn severity(&self) -> IssueSeverity

Severity allows the user to filter out unimportant issues, with Bug being the highest priority and Info being the lowest.

Source

fn description<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Option<StyledString>>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait,

A more verbose message of the issue, appropriate for providing multiline information of the issue.

Source

fn detail<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Option<StyledString>>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait,

Full details of the issue, appropriate for providing debug level information. Only displayed if the user explicitly asks for detailed messages (not to be confused with severity).

A link to relevant documentation of the issue. Only displayed in console if the user explicitly asks for detailed messages.

Source

fn source(&self) -> Option<IssueSource>

The source location that caused the issue. Eg, for a parsing error it should point at the offending character. Displayed to the user alongside the title/description.

Source

fn additional_sources<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Vec<AdditionalIssueSource>>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait,

Additional source locations related to this issue (e.g., generated code from a loader). Each source includes a description and location. These are displayed alongside the primary source to give users full context about the error.

Trait Implementations§

Source§

impl TraitVtablePrototype for Box<dyn Issue>

Source§

const LEN: usize = 0usize

Source§

const DEFAULTS: &[Option<&NativeFunction>]

Source§

impl VcValueTrait for Box<dyn Issue>

Source§

type ValueTrait = dyn Issue

Source§

fn get_trait_type_id() -> TraitTypeId

Returns the type id of the trait object.
Source§

fn get_impl_vtables() -> &'static VTableRegistry<Self::ValueTrait>

Returns the vtable for an implementation of this trait. Panics if ValueTypeId does not implement the trait.
Source§

impl Dynamic<Box<dyn Issue>> for Box<dyn Issue>

Source§

impl Dynamic<Box<dyn ValueDebug>> for Box<dyn Issue>

Available on debug-assertions enabled only.
Source§

impl Upcast<Box<dyn Issue>> for Box<dyn Issue>

Source§

impl Upcast<Box<dyn ValueDebug>> for Box<dyn Issue>

Available on debug-assertions enabled only.
Source§

impl UpcastStrict<Box<dyn ValueDebug>> for Box<dyn Issue>

Available on debug-assertions enabled only.

Implementors§