Enum brane_ast::warnings::AstWarning
source · pub enum AstWarning {
AttributesWarning(AttributesWarning),
TypeWarning(TypeWarning),
MetadataWarning(MetadataWarning),
CompileWarning(CompileWarning),
}
Variants§
AttributesWarning(AttributesWarning)
An warning has occurred while processing attributes.
TypeWarning(TypeWarning)
An warning has occurred while analysing types.
MetadataWarning(MetadataWarning)
An warning has occurred while processing tags/metadata.
CompileWarning(CompileWarning)
An warning has occurred while doing the actual compiling.
Implementations§
source§impl AstWarning
impl AstWarning
sourcepub fn prettyprint(&self, file: impl AsRef<str>, source: impl AsRef<str>)
pub fn prettyprint(&self, file: impl AsRef<str>, source: impl AsRef<str>)
Prints the warning in a pretty way to stderr.
§Arguments
file
: The ‘path’ of the file (or some other identifier) where the source text originates from.source
: The source text to read the debug range from.
sourcepub fn prettywrite(
&self,
writer: impl Write,
file: impl AsRef<str>,
source: impl AsRef<str>,
) -> Result<(), Error>
pub fn prettywrite( &self, writer: impl Write, file: impl AsRef<str>, source: impl AsRef<str>, ) -> Result<(), Error>
Prints the warning in a pretty way to the given Write
r.
§Arguments:
writer
: TheWrite
-enabled object to write to.file
: The ‘path’ of the file (or some other identifier) where the source text originates from.source
: The source text to read the debug range from.
§Errors
This function may error if we failed to write to the given writer.
Trait Implementations§
source§impl Debug for AstWarning
impl Debug for AstWarning
source§impl Display for AstWarning
impl Display for AstWarning
source§impl From<AttributesWarning> for AstWarning
impl From<AttributesWarning> for AstWarning
source§fn from(warn: AttributesWarning) -> Self
fn from(warn: AttributesWarning) -> Self
Converts to this type from the input type.
source§impl From<CompileWarning> for AstWarning
impl From<CompileWarning> for AstWarning
source§fn from(warn: CompileWarning) -> Self
fn from(warn: CompileWarning) -> Self
Converts to this type from the input type.
source§impl From<MetadataWarning> for AstWarning
impl From<MetadataWarning> for AstWarning
source§fn from(warn: MetadataWarning) -> Self
fn from(warn: MetadataWarning) -> Self
Converts to this type from the input type.
source§impl From<TypeWarning> for AstWarning
impl From<TypeWarning> for AstWarning
source§fn from(warn: TypeWarning) -> Self
fn from(warn: TypeWarning) -> Self
Converts to this type from the input type.
impl Warning for AstWarning
Auto Trait Implementations§
impl Freeze for AstWarning
impl RefUnwindSafe for AstWarning
impl Send for AstWarning
impl Sync for AstWarning
impl Unpin for AstWarning
impl UnwindSafe for AstWarning
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> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request