pub struct NestedComment {
pub container_path: Vec<CommentPathSegment>,
pub position: usize,
pub text: String,
pub inline: bool,
}Expand description
A comment inside a nested mapping or sequence.
container_path locates the immediate parent. For own-line comments
(inline = false), position is the child slot ordinal (0..=child_count,
where child_count means “after all children”). For inline comments
(inline = true), position is the host child’s index; orphaned inlines
degrade to own-line at emit time.
Fields§
§container_path: Vec<CommentPathSegment>§position: usize§text: String§inline: boolTrait Implementations§
Source§impl Clone for NestedComment
impl Clone for NestedComment
Source§fn clone(&self) -> NestedComment
fn clone(&self) -> NestedComment
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 NestedComment
impl Debug for NestedComment
impl Eq for NestedComment
Source§impl From<&NestedComment> for NestedCommentV0_82_0
impl From<&NestedComment> for NestedCommentV0_82_0
Source§fn from(nc: &NestedComment) -> Self
fn from(nc: &NestedComment) -> Self
Converts to this type from the input type.
Source§impl From<NestedCommentV0_82_0> for NestedComment
impl From<NestedCommentV0_82_0> for NestedComment
Source§fn from(nc: NestedCommentV0_82_0) -> Self
fn from(nc: NestedCommentV0_82_0) -> Self
Converts to this type from the input type.
Source§impl PartialEq for NestedComment
impl PartialEq for NestedComment
Source§fn eq(&self, other: &NestedComment) -> bool
fn eq(&self, other: &NestedComment) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for NestedComment
Auto Trait Implementations§
impl Freeze for NestedComment
impl RefUnwindSafe for NestedComment
impl Send for NestedComment
impl Sync for NestedComment
impl Unpin for NestedComment
impl UnsafeUnpin for NestedComment
impl UnwindSafe for NestedComment
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.