Struct serde_sarif::sarif::Region
source · pub struct Region {
pub byte_length: Option<i64>,
pub byte_offset: Option<i64>,
pub char_length: Option<i64>,
pub char_offset: Option<i64>,
pub end_column: Option<i64>,
pub end_line: Option<i64>,
pub message: Option<Message>,
pub properties: Option<PropertyBag>,
pub snippet: Option<ArtifactContent>,
pub source_language: Option<String>,
pub start_column: Option<i64>,
pub start_line: Option<i64>,
}Expand description
A region within an artifact where a result was detected.
Fields§
§byte_length: Option<i64>The length of the region in bytes.
byte_offset: Option<i64>The zero-based offset from the beginning of the artifact of the first byte in the region.
char_length: Option<i64>The length of the region in characters.
char_offset: Option<i64>The zero-based offset from the beginning of the artifact of the first character in the region.
end_column: Option<i64>The column number of the character following the end of the region.
end_line: Option<i64>The line number of the last character in the region.
message: Option<Message>A message relevant to the region.
properties: Option<PropertyBag>Key/value pairs that provide additional information about the region.
snippet: Option<ArtifactContent>The portion of the artifact contents within the specified region.
source_language: Option<String>Specifies the source language, if any, of the portion of the artifact specified by the region object.
start_column: Option<i64>The column number of the first character in the region.
start_line: Option<i64>The line number of the first character in the region.
Implementations§
source§impl Region
impl Region
sourcepub fn builder() -> RegionBuilder<((), (), (), (), (), (), (), (), (), (), (), ())>
pub fn builder() -> RegionBuilder<((), (), (), (), (), (), (), (), (), (), (), ())>
Create a builder for building Region.
On the builder, call .byte_length(...)(optional), .byte_offset(...)(optional), .char_length(...)(optional), .char_offset(...)(optional), .end_column(...)(optional), .end_line(...)(optional), .message(...)(optional), .properties(...)(optional), .snippet(...)(optional), .source_language(...)(optional), .start_column(...)(optional), .start_line(...)(optional) to set the values of the fields.
Finally, call .build() to create the instance of Region.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Region
impl<'de> Deserialize<'de> for Region
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl StructuralPartialEq for Region
Auto Trait Implementations§
impl Freeze for Region
impl RefUnwindSafe for Region
impl Send for Region
impl Sync for Region
impl Unpin for Region
impl UnwindSafe for Region
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit)