Skip to main content

WarnEvent

Struct WarnEvent 

Source
pub struct WarnEvent<'a> {
    pub kind: WarnKind,
    pub deprecation: bool,
    pub deprecation_id: &'a str,
    pub message: &'a str,
    pub formatted: &'a str,
    pub url: &'a str,
    pub line: usize,
}
Expand description

A @warn / @debug / deprecation diagnostic delivered to an embedder’s WarnHandler (dart-sass logger).

Fields§

§kind: WarnKind

Warning vs debug.

§deprecation: bool

True for a deprecation warning.

§deprecation_id: &'a str

The deprecation id (e.g. "slash-div"), or "" when not a deprecation.

§message: &'a str

The raw message text (the @warn/@debug value, or deprecation message).

§formatted: &'a str

The full dart-style block sasso would otherwise print to stderr (header + snippet + stack trace), for a faithful default logger.

§url: &'a str

The source URL for the diagnostic’s span; "" when not available.

§line: usize

The 1-based line for the diagnostic’s span; 0 when not available.

Auto Trait Implementations§

§

impl<'a> Freeze for WarnEvent<'a>

§

impl<'a> RefUnwindSafe for WarnEvent<'a>

§

impl<'a> Send for WarnEvent<'a>

§

impl<'a> Sync for WarnEvent<'a>

§

impl<'a> Unpin for WarnEvent<'a>

§

impl<'a> UnsafeUnpin for WarnEvent<'a>

§

impl<'a> UnwindSafe for WarnEvent<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.