Struct move_compiler::diagnostics::Diagnostic
source · [−]pub struct Diagnostic { /* private fields */ }
Implementations
sourceimpl Diagnostic
impl Diagnostic
pub fn new(
code: impl DiagnosticCode,
(loc, label): (Loc, impl ToString),
secondary_labels: impl IntoIterator<Item = (Loc, impl ToString)>,
notes: impl IntoIterator<Item = impl ToString>
) -> Self
pub fn set_code(self, code: impl DiagnosticCode) -> Self
pub fn add_secondary_labels(
&mut self,
additional_labels: impl IntoIterator<Item = (Loc, impl ToString)>
)
pub fn add_secondary_label(&mut self, (loc, msg): (Loc, impl ToString))
pub fn extra_labels_len(&self) -> usize
pub fn add_notes(
&mut self,
additional_notes: impl IntoIterator<Item = impl ToString>
)
pub fn add_note(&mut self, msg: impl ToString)
Trait Implementations
sourceimpl Clone for Diagnostic
impl Clone for Diagnostic
sourcefn clone(&self) -> Diagnostic
fn clone(&self) -> Diagnostic
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 Diagnostic
impl Debug for Diagnostic
sourceimpl FromIterator<Diagnostic> for Diagnostics
impl FromIterator<Diagnostic> for Diagnostics
sourcefn from_iter<I: IntoIterator<Item = Diagnostic>>(iter: I) -> Self
fn from_iter<I: IntoIterator<Item = Diagnostic>>(iter: I) -> Self
Creates a value from an iterator. Read more
sourceimpl Hash for Diagnostic
impl Hash for Diagnostic
sourceimpl PartialEq<Diagnostic> for Diagnostic
impl PartialEq<Diagnostic> for Diagnostic
sourcefn 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 ==
. Read more
sourcefn ne(&self, other: &Diagnostic) -> bool
fn ne(&self, other: &Diagnostic) -> bool
This method tests for !=
.
impl Eq for Diagnostic
impl StructuralEq for Diagnostic
impl StructuralPartialEq for Diagnostic
Auto Trait Implementations
impl RefUnwindSafe for Diagnostic
impl Send for Diagnostic
impl Sync for Diagnostic
impl Unpin for Diagnostic
impl UnwindSafe for Diagnostic
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> CallHasher for T where
T: Hash + ?Sized,
impl<T> CallHasher for T where
T: Hash + ?Sized,
sourceimpl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to key
and return true
if they are equal.
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.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more