Enum brane_ast::errors::FlattenError
source · pub enum FlattenError {
IntermediateResultConflict {
name: String,
},
}
Expand description
Defines errors that occur during the flatten traversal.
Variants§
IntermediateResultConflict
There was a name conflict between intermediate results
Implementations§
source§impl FlattenError
impl FlattenError
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 FlattenError
impl Debug for FlattenError
source§impl Display for FlattenError
impl Display for FlattenError
source§impl Error for FlattenError
impl Error for FlattenError
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
source§impl From<FlattenError> for AstError
impl From<FlattenError> for AstError
source§fn from(err: FlattenError) -> Self
fn from(err: FlattenError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for FlattenError
impl RefUnwindSafe for FlattenError
impl Send for FlattenError
impl Sync for FlattenError
impl Unpin for FlattenError
impl UnwindSafe for FlattenError
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