pub struct DiagnosticHit {
pub index: usize,
pub diagnostic: Diagnostic,
}Expand description
Owned diagnostic plus its original slice index.
§Examples
use ailloli_ui_editor::{Diagnostic, DiagnosticHit, DiagnosticSeverity};
let hit = DiagnosticHit { index: 2, diagnostic: Diagnostic::new(0..1, DiagnosticSeverity::Info, "note") };
assert_eq!(hit.index, 2);Fields§
§index: usizeIndex in the searched diagnostics slice.
diagnostic: DiagnosticCloned matching diagnostic.
Trait Implementations§
Source§impl Clone for DiagnosticHit
impl Clone for DiagnosticHit
Source§fn clone(&self) -> DiagnosticHit
fn clone(&self) -> DiagnosticHit
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 DiagnosticHit
impl Debug for DiagnosticHit
Source§impl PartialEq for DiagnosticHit
impl PartialEq for DiagnosticHit
impl Eq for DiagnosticHit
impl StructuralPartialEq for DiagnosticHit
Auto Trait Implementations§
impl Freeze for DiagnosticHit
impl RefUnwindSafe for DiagnosticHit
impl Send for DiagnosticHit
impl Sync for DiagnosticHit
impl Unpin for DiagnosticHit
impl UnwindSafe for DiagnosticHit
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.