Struct hotg_rune_compiler::Diagnostics
source · [−]pub struct Diagnostics(_);
Expand description
A collection of Diagnostic
s.
Implementations
sourceimpl Diagnostics
impl Diagnostics
pub fn new() -> Self
pub fn iter(&self) -> impl Iterator<Item = &Diagnostic<()>> + '_
sourcepub fn iter_severity(
&self,
severity: Severity
) -> impl Iterator<Item = &Diagnostic<()>> + '_
pub fn iter_severity(
&self,
severity: Severity
) -> impl Iterator<Item = &Diagnostic<()>> + '_
Get an iterator over all the Diagnostic
s that are at least as severe
as a certain Severity
.
sourcepub fn has_severity(&self, severity: Severity) -> bool
pub fn has_severity(&self, severity: Severity) -> bool
Are there any diagnostics which are at least as severe as a certain
Severity
level?
sourcepub fn has_errors(&self) -> bool
pub fn has_errors(&self) -> bool
Does this set of Diagnostics
contain any Diagnostic
s which are
at least as bad as an error?
sourcepub fn has_warnings(&self) -> bool
pub fn has_warnings(&self) -> bool
Does this set of Diagnostics
contain any Diagnostic
s which are
at least as bad as a warning?
sourcepub fn push(&mut self, diag: Diagnostic<()>)
pub fn push(&mut self, diag: Diagnostic<()>)
Add a new Diagnostic
to the collection.
sourcepub fn is_empty(&self) -> bool
pub fn is_empty(&self) -> bool
Is this collection of Diagnostic
s empty?
pub fn len(&self) -> usize
sourcepub fn drain(&mut self) -> impl Iterator<Item = Diagnostic<()>> + '_
pub fn drain(&mut self) -> impl Iterator<Item = Diagnostic<()>> + '_
Remove all Diagnostic
s from this set of Diagnostics
.
Trait Implementations
sourceimpl Clone for Diagnostics
impl Clone for Diagnostics
sourcefn clone(&self) -> Diagnostics
fn clone(&self) -> Diagnostics
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for Diagnostics
impl Debug for Diagnostics
sourceimpl Default for Diagnostics
impl Default for Diagnostics
sourcefn default() -> Diagnostics
fn default() -> Diagnostics
Returns the “default value” for a type. Read more
sourceimpl Extend<Diagnostic<()>> for Diagnostics
impl Extend<Diagnostic<()>> for Diagnostics
sourcefn extend<T: IntoIterator<Item = Diagnostic<()>>>(&mut self, iter: T)
fn extend<T: IntoIterator<Item = Diagnostic<()>>>(&mut self, iter: T)
Extends a collection with the contents of an iterator. Read more
sourcefn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
extend_one
)Extends a collection with exactly one element.
sourcefn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
extend_one
)Reserves capacity in a collection for the given number of additional elements. Read more
sourceimpl<'a> IntoIterator for &'a Diagnostics
impl<'a> IntoIterator for &'a Diagnostics
type IntoIter = <&'a Vec<Diagnostic<()>> as IntoIterator>::IntoIter
type IntoIter = <&'a Vec<Diagnostic<()>> as IntoIterator>::IntoIter
Which kind of iterator are we turning this into?
type Item = &'a Diagnostic<()>
type Item = &'a Diagnostic<()>
The type of the elements being iterated over.
sourceimpl IntoIterator for Diagnostics
impl IntoIterator for Diagnostics
type IntoIter = <Vec<Diagnostic<()>> as IntoIterator>::IntoIter
type IntoIter = <Vec<Diagnostic<()>> as IntoIterator>::IntoIter
Which kind of iterator are we turning this into?
type Item = Diagnostic<()>
type Item = Diagnostic<()>
The type of the elements being iterated over.
sourceimpl PartialEq<Diagnostics> for Diagnostics
impl PartialEq<Diagnostics> for Diagnostics
sourcefn eq(&self, other: &Diagnostics) -> bool
fn eq(&self, other: &Diagnostics) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &Diagnostics) -> bool
fn ne(&self, other: &Diagnostics) -> bool
This method tests for !=
.
impl StructuralPartialEq for Diagnostics
Auto Trait Implementations
impl RefUnwindSafe for Diagnostics
impl Send for Diagnostics
impl Sync for Diagnostics
impl Unpin for Diagnostics
impl UnwindSafe for Diagnostics
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Component for T where
T: 'static + Send + Sync,
impl<T> Component for T where
T: 'static + Send + Sync,
type Storage = PackedStorage<T>
type Storage = PackedStorage<T>
The storage type required to hold all instances of this component in a world.
sourceimpl<T> Downcast for T where
T: Any,
impl<T> Downcast for T where
T: Any,
sourcepub fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
pub fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
Convert Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
. Read more
sourcepub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
pub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
Convert Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
. Read more
sourcepub fn as_any(&self) -> &(dyn Any + 'static)
pub fn as_any(&self) -> &(dyn Any + 'static)
Convert &Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s. Read more
sourcepub fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
pub fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert &mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s. Read more
sourceimpl<T> DowncastSync for T where
T: Any + Send + Sync,
impl<T> DowncastSync for T where
T: Any + Send + Sync,
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more