pub enum AnnotationSpan {
Line {
start: u32,
end: Option<u32>,
},
Column {
line: u32,
start: u32,
end: Option<u32>,
},
}Expand description
A valid annotation span.
§Examples
use actions_rs::{Annotation, AnnotationKind, AnnotationSpan};
let c = Annotation::new()
.span(AnnotationSpan::Column { line: 7, start: 3, end: Some(9) })
.command(AnnotationKind::Error, "bad token");
assert_eq!(c.to_string(), "::error line=7,col=3,endColumn=9::bad token");Variants§
Line
A whole-line span.
Column
A same-line column span.
When end is omitted GitHub treats the span as a single column.
Trait Implementations§
Source§impl Clone for AnnotationSpan
impl Clone for AnnotationSpan
Source§fn clone(&self) -> AnnotationSpan
fn clone(&self) -> AnnotationSpan
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 AnnotationSpan
impl Debug for AnnotationSpan
Source§impl PartialEq for AnnotationSpan
impl PartialEq for AnnotationSpan
Source§fn eq(&self, other: &AnnotationSpan) -> bool
fn eq(&self, other: &AnnotationSpan) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for AnnotationSpan
impl Eq for AnnotationSpan
impl StructuralPartialEq for AnnotationSpan
Auto Trait Implementations§
impl Freeze for AnnotationSpan
impl RefUnwindSafe for AnnotationSpan
impl Send for AnnotationSpan
impl Sync for AnnotationSpan
impl Unpin for AnnotationSpan
impl UnsafeUnpin for AnnotationSpan
impl UnwindSafe for AnnotationSpan
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