Struct vhdl_lang::Diagnostic
source · pub struct Diagnostic {
pub pos: SrcPos,
pub message: String,
pub related: Vec<(SrcPos, String)>,
pub code: ErrorCode,
}
Fields§
§pos: SrcPos
§message: String
§code: ErrorCode
Implementations§
source§impl Diagnostic
impl Diagnostic
pub fn invalid_formal(pos: impl AsRef<SrcPos>) -> Diagnostic
pub fn invalid_formal_conversion(pos: impl AsRef<SrcPos>) -> Diagnostic
pub fn invalid_type_conversion( pos: impl AsRef<SrcPos>, from: BaseType<'_>, to: TypeEnt<'_> ) -> Diagnostic
source§impl Diagnostic
impl Diagnostic
pub fn ambiguous_call<'a>( call_name: &WithPos<Designator>, candidates: impl IntoIterator<Item = OverloadedEnt<'a>> ) -> Diagnostic
source§impl Diagnostic
impl Diagnostic
pub fn add_subprogram_candidates<'a>( &mut self, prefix: &str, candidates: impl IntoIterator<Item = OverloadedEnt<'a>> )
pub fn add_type_candididates<'a>( &mut self, prefix: &str, candidates: impl IntoIterator<Item = BaseType<'a>> )
source§impl Diagnostic
impl Diagnostic
source§impl Diagnostic
impl Diagnostic
Specialized diagnostics with pre-defined messages and error codes
pub fn syntax_error( item: impl AsRef<SrcPos>, msg: impl Into<String> ) -> Diagnostic
pub fn circular_dependency(item: impl AsRef<SrcPos>) -> Diagnostic
pub fn internal(item: impl AsRef<SrcPos>, msg: impl Into<String>) -> Diagnostic
Trait Implementations§
source§impl Clone for Diagnostic
impl Clone for Diagnostic
source§fn clone(&self) -> Diagnostic
fn clone(&self) -> Diagnostic
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for Diagnostic
impl Debug for Diagnostic
source§impl Hash for Diagnostic
impl Hash for Diagnostic
source§impl PartialEq for Diagnostic
impl PartialEq for Diagnostic
source§fn eq(&self, other: &Diagnostic) -> bool
fn eq(&self, other: &Diagnostic) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for Diagnostic
impl StructuralPartialEq for Diagnostic
Auto Trait Implementations§
impl Freeze for Diagnostic
impl !RefUnwindSafe for Diagnostic
impl Send for Diagnostic
impl Sync for Diagnostic
impl Unpin for Diagnostic
impl !UnwindSafe for Diagnostic
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.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