pub enum AnnotationScope {
File,
Symbol {
name: String,
resolved_lines: Option<(u32, u32)>,
},
Lines(u32, u32),
}Expand description
What part of a file an annotation targets.
Variants§
Implementations§
Source§impl AnnotationScope
impl AnnotationScope
pub fn validate(&self) -> Result<(), ContextError>
pub fn matches(&self, other: &AnnotationScope) -> bool
pub fn symbol_name(&self) -> Option<&str>
pub fn line_range(&self) -> Option<(u32, u32)>
Trait Implementations§
Source§impl Clone for AnnotationScope
impl Clone for AnnotationScope
Source§fn clone(&self) -> AnnotationScope
fn clone(&self) -> AnnotationScope
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 AnnotationScope
impl Debug for AnnotationScope
Source§impl<'de> Deserialize<'de> for AnnotationScope
impl<'de> Deserialize<'de> for AnnotationScope
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<AnnotationScope, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<AnnotationScope, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for AnnotationScope
impl Display for AnnotationScope
impl Eq for AnnotationScope
Source§impl PartialEq for AnnotationScope
impl PartialEq for AnnotationScope
Source§impl Serialize for AnnotationScope
impl Serialize for AnnotationScope
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for AnnotationScope
Auto Trait Implementations§
impl Freeze for AnnotationScope
impl RefUnwindSafe for AnnotationScope
impl Send for AnnotationScope
impl Sync for AnnotationScope
impl Unpin for AnnotationScope
impl UnsafeUnpin for AnnotationScope
impl UnwindSafe for AnnotationScope
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