Struct tvix_eval::EvalWarning
source · pub struct EvalWarning {
pub kind: WarningKind,
pub span: Span,
}
Fields§
§kind: WarningKind
§span: Span
Implementations§
source§impl EvalWarning
impl EvalWarning
sourcepub fn fancy_format_str(&self, source: &SourceCode) -> String
pub fn fancy_format_str(&self, source: &SourceCode) -> String
Render a fancy, human-readable output of this warning and return it as a String. Note that this version of the output does not include any colours or font styles.
sourcepub fn fancy_format_stderr(&self, source: &SourceCode)
pub fn fancy_format_stderr(&self, source: &SourceCode)
Render a fancy, human-readable output of this warning and print it to stderr. If rendered in a terminal that supports colours and font styles, the output will include those.
sourcefn span_label(&self) -> Option<String>
fn span_label(&self) -> Option<String>
Create the optional span label displayed as an annotation on the underlined span of the warning.
sourcefn message(&self, source: &SourceCode) -> String
fn message(&self, source: &SourceCode) -> String
Create the primary warning message displayed to users for a warning.
sourcefn code(&self) -> &'static str
fn code(&self) -> &'static str
Return the unique warning code for this variant which can be used to refer users to documentation.
fn diagnostic(&self, source: &SourceCode) -> Diagnostic
Trait Implementations§
Auto Trait Implementations§
impl Freeze for EvalWarning
impl RefUnwindSafe for EvalWarning
impl Send for EvalWarning
impl Sync for EvalWarning
impl Unpin for EvalWarning
impl UnwindSafe for EvalWarning
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
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more