Struct rustc_errors::snippet::MultilineAnnotation
source · pub struct MultilineAnnotation {
pub depth: usize,
pub line_start: usize,
pub line_end: usize,
pub start_col: usize,
pub end_col: usize,
pub is_primary: bool,
pub label: Option<String>,
pub overlaps_exactly: bool,
}
Fields
depth: usize
line_start: usize
line_end: usize
start_col: usize
end_col: usize
is_primary: bool
label: Option<String>
overlaps_exactly: bool
Implementations
sourceimpl MultilineAnnotation
impl MultilineAnnotation
pub fn increase_depth(&mut self)
sourcepub fn same_span(&self, other: &MultilineAnnotation) -> bool
pub fn same_span(&self, other: &MultilineAnnotation) -> bool
Compare two MultilineAnnotation
s considering only the Span
they cover.
pub fn as_start(&self) -> Annotation
pub fn as_end(&self) -> Annotation
pub fn as_line(&self) -> Annotation
Trait Implementations
sourceimpl Clone for MultilineAnnotation
impl Clone for MultilineAnnotation
sourcefn clone(&self) -> MultilineAnnotation
fn clone(&self) -> MultilineAnnotation
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 moresourceimpl Debug for MultilineAnnotation
impl Debug for MultilineAnnotation
sourceimpl Ord for MultilineAnnotation
impl Ord for MultilineAnnotation
sourcefn cmp(&self, other: &MultilineAnnotation) -> Ordering
fn cmp(&self, other: &MultilineAnnotation) -> Ordering
1.21.0 · sourcefn max(self, other: Self) -> Self
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
1.21.0 · sourcefn min(self, other: Self) -> Self
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl PartialEq<MultilineAnnotation> for MultilineAnnotation
impl PartialEq<MultilineAnnotation> for MultilineAnnotation
sourcefn eq(&self, other: &MultilineAnnotation) -> bool
fn eq(&self, other: &MultilineAnnotation) -> bool
sourceimpl PartialOrd<MultilineAnnotation> for MultilineAnnotation
impl PartialOrd<MultilineAnnotation> for MultilineAnnotation
sourcefn partial_cmp(&self, other: &MultilineAnnotation) -> Option<Ordering>
fn partial_cmp(&self, other: &MultilineAnnotation) -> Option<Ordering>
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Eq for MultilineAnnotation
impl StructuralEq for MultilineAnnotation
impl StructuralPartialEq for MultilineAnnotation
Auto Trait Implementations
impl RefUnwindSafe for MultilineAnnotation
impl Send for MultilineAnnotation
impl Sync for MultilineAnnotation
impl Unpin for MultilineAnnotation
impl UnwindSafe for MultilineAnnotation
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
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
Layout
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference’s “Type Layout” chapter for details on type layout guarantees.
Size: 72 bytes