Trait Issue

Source
pub trait Issue:
    Send
    + Sync
    + NonLocalValue
    + ValueDebug {
    // Required methods
    fn file_path(self: Vc<Self>) -> Vc<FileSystemPath>
       where Self: Sized;
    fn stage(self: Vc<Self>) -> Vc<IssueStage>
       where Self: Sized;
    fn title(self: Vc<Self>) -> Vc<StyledString>
       where Self: Sized;

    // Provided methods
    fn severity(&self) -> IssueSeverity { ... }
    fn description(self: Vc<Self>) -> Vc<OptionStyledString>
       where Self: Sized { ... }
    fn detail(self: Vc<Self>) -> Vc<OptionStyledString>
       where Self: Sized { ... }
    fn documentation_link(self: Vc<Self>) -> Vc<RcStr>
       where Self: Sized { ... }
    fn source(self: Vc<Self>) -> Vc<OptionIssueSource>
       where Self: Sized { ... }
}

Required Methods§

Source

fn file_path(self: Vc<Self>) -> Vc<FileSystemPath>
where Self: Sized,

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

Source

fn stage(self: Vc<Self>) -> Vc<IssueStage>
where Self: Sized,

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

Source

fn title(self: Vc<Self>) -> Vc<StyledString>
where Self: Sized,

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(self: Vc<Self>) -> Vc<OptionStyledString>
where Self: Sized,

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

Source

fn detail(self: Vc<Self>) -> Vc<OptionStyledString>
where Self: Sized,

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: Vc<Self>) -> Vc<OptionIssueSource>
where Self: Sized,

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.

Trait Implementations§

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>

Source§

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

Source§

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

Implementors§