Struct rustc_errors::snippet::Annotation [−][src]
pub struct Annotation { pub start_col: usize, pub end_col: usize, pub is_primary: bool, pub label: Option<String>, pub annotation_type: AnnotationType, }
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Fields
start_col: usize
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Start column, 0-based indexing -- counting characters, not utf-8 bytes. Note that it is important that this field goes first, so that when we sort, we sort orderings by start column.
end_col: usize
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
End column within the line (exclusive)
is_primary: bool
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Is this annotation derived from primary span
label: Option<String>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Optional label to display adjacent to the annotation.
annotation_type: AnnotationType
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Is this a single line, multiline or multiline span minimized down to a smaller span.
Methods
impl Annotation
[src]
impl Annotation
pub fn is_line(&self) -> bool
[src]
pub fn is_line(&self) -> bool
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Whether this annotation is a vertical line placeholder.
pub fn is_multiline(&self) -> bool
[src]
pub fn is_multiline(&self) -> bool
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn len(&self) -> usize
[src]
pub fn len(&self) -> usize
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn has_label(&self) -> bool
[src]
pub fn has_label(&self) -> bool
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn takes_space(&self) -> bool
[src]
pub fn takes_space(&self) -> bool
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Trait Implementations
impl Clone for Annotation
[src]
impl Clone for Annotation
fn clone(&self) -> Annotation
[src]
fn clone(&self) -> Annotation
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Debug for Annotation
[src]
impl Debug for Annotation
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl PartialOrd for Annotation
[src]
impl PartialOrd for Annotation
fn partial_cmp(&self, other: &Annotation) -> Option<Ordering>
[src]
fn partial_cmp(&self, other: &Annotation) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, other: &Annotation) -> bool
[src]
fn lt(&self, other: &Annotation) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, other: &Annotation) -> bool
[src]
fn le(&self, other: &Annotation) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, other: &Annotation) -> bool
[src]
fn gt(&self, other: &Annotation) -> bool
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, other: &Annotation) -> bool
[src]
fn ge(&self, other: &Annotation) -> bool
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl Ord for Annotation
[src]
impl Ord for Annotation
fn cmp(&self, other: &Annotation) -> Ordering
[src]
fn cmp(&self, other: &Annotation) -> Ordering
This method returns an Ordering
between self
and other
. Read more
fn max(self, other: Self) -> Self
1.21.0[src]
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.21.0[src]
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
impl PartialEq for Annotation
[src]
impl PartialEq for Annotation
fn eq(&self, other: &Annotation) -> bool
[src]
fn eq(&self, other: &Annotation) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Annotation) -> bool
[src]
fn ne(&self, other: &Annotation) -> bool
This method tests for !=
.
impl Eq for Annotation
[src]
impl Eq for Annotation
fn assert_receiver_is_total_eq(&self)
[src]
fn assert_receiver_is_total_eq(&self)
Auto Trait Implementations
impl Send for Annotation
impl Send for Annotation
impl Sync for Annotation
impl Sync for Annotation