pub struct FileAnnotation {
pub severity: AnnotationLevel,
pub path: String,
pub start_line: Option<usize>,
pub end_line: Option<usize>,
pub start_column: Option<usize>,
pub end_column: Option<usize>,
pub title: Option<String>,
pub message: String,
}Expand description
A structure to describe the output of a file annotation.
Fields§
§severity: AnnotationLevelThe severity level of the annotation.
path: StringThe path to the file being annotated.
This is relative to the repository root.
It should not start with a leading slash (not ./).
It should only use posix-style path separators (/), even on Windows runners.
On Github, this can be left blank if the annotation is to be specific to the workflow run.
start_line: Option<usize>The line number where the annotation starts (1-based).
If not provided, the annotation will be scoped to the entire file (and Self::end_line will be ignored).
This is ignored if Self::path is blank.
end_line: Option<usize>The line number where the annotation ends (1-based).
If not provided, the annotation will be placed at the specified Self::start_line instead.
This is ignored if Self::path is blank.
start_column: Option<usize>The column number where the annotation starts (1-based).
This is ignored if the Self::start_line is not provided, or if Self::path is blank.
end_column: Option<usize>The column number where the annotation ends (1-based).
This is ignored if
- the
Self::start_lineandSelf::end_lineare not provided - the
Self::end_lineis less than or equal toSelf::start_line - the
Self::start_columnis provided but is not less than thisSelf::end_column - the
Self::pathis blank
title: Option<String>The title of the annotation, which will be shown in the Git Server’s UI.
message: StringThe message of the annotation, which will be shown in the Git Server’s UI.
This shall not contain any line breaks. Some Git Servers may support a limited set of markdown syntax, but this is not guaranteed.
Trait Implementations§
Source§impl Debug for FileAnnotation
impl Debug for FileAnnotation
Source§impl Default for FileAnnotation
impl Default for FileAnnotation
Source§fn default() -> FileAnnotation
fn default() -> FileAnnotation
Auto Trait Implementations§
impl Freeze for FileAnnotation
impl RefUnwindSafe for FileAnnotation
impl Send for FileAnnotation
impl Sync for FileAnnotation
impl Unpin for FileAnnotation
impl UnsafeUnpin for FileAnnotation
impl UnwindSafe for FileAnnotation
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.