pub struct Anchor {
pub file: String,
pub line: Option<u32>,
pub line_end: Option<u32>,
pub on_old_side: bool,
pub line_text: Option<String>,
}Expand description
Where a comment is anchored. line (and line_end for visual ranges)
is the new-side line number unless the line is a deletion, then it is
the old-side number with on_old_side.
Fields§
§file: String§line: Option<u32>§line_end: Option<u32>§on_old_side: bool§line_text: Option<String>Snapshot of the anchored line’s text, so we can mark the comment outdated when the line changes.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Anchor
impl<'de> Deserialize<'de> for Anchor
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>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Anchor
impl StructuralPartialEq for Anchor
Auto Trait Implementations§
impl Freeze for Anchor
impl RefUnwindSafe for Anchor
impl Send for Anchor
impl Sync for Anchor
impl Unpin for Anchor
impl UnsafeUnpin for Anchor
impl UnwindSafe for Anchor
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