pub struct CommentSpan {
pub file: PathBuf,
pub span: [usize; 2],
pub lines: [usize; 2],
pub kind: CommentKind,
pub text: String,
pub hash: String,
pub attached_item: Option<AttachedItem>,
pub in_body: bool,
pub annotation: bool,
}Fields§
§file: PathBuf§span: [usize; 2]Byte range [start, end) in the file. Pass it back verbatim to apply.
lines: [usize; 2]1-based inclusive line range.
kind: CommentKind§text: StringRaw source text of the span, comment markers included.
hash: StringGuard for apply and the sole key it resolves an op by: blake3 of text plus this
span’s occurrence ordinal among same-text spans in the file, first 16 hex chars. Unique
per file by construction — file_spans hard-errors if it ever were not.
attached_item: Option<AttachedItem>§in_body: bool§annotation: boolTrue if the span holds an @yah: / @arch: annotation (or its wrapped continuation).
Trait Implementations§
Source§impl Clone for CommentSpan
impl Clone for CommentSpan
Source§impl Debug for CommentSpan
impl Debug for CommentSpan
Source§impl<'de> Deserialize<'de> for CommentSpan
impl<'de> Deserialize<'de> for CommentSpan
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
Auto Trait Implementations§
impl Freeze for CommentSpan
impl RefUnwindSafe for CommentSpan
impl Send for CommentSpan
impl Sync for CommentSpan
impl Unpin for CommentSpan
impl UnsafeUnpin for CommentSpan
impl UnwindSafe for CommentSpan
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