pub struct FieldReference { /* private fields */ }Expand description
Source provenance for an extension or not-yet-typed field.
The loss-aware SyntaxDocument retains the actual value and spelling. This reference lets
typed callers locate it without exposing the private YAML implementation.
Implementations§
Source§impl FieldReference
impl FieldReference
Sourcepub const fn name(&self) -> &Located<String>
pub const fn name(&self) -> &Located<String>
Returns the semantic field name and its source span.
Sourcepub const fn span(&self) -> SourceSpan
pub const fn span(&self) -> SourceSpan
Returns the span covering the key and value when both are available.
Sourcepub const fn value_span(&self) -> Option<SourceSpan>
pub const fn value_span(&self) -> Option<SourceSpan>
Returns the value span when the YAML node exposes one.
Trait Implementations§
Source§impl Clone for FieldReference
impl Clone for FieldReference
Source§fn clone(&self) -> FieldReference
fn clone(&self) -> FieldReference
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 FieldReference
impl Debug for FieldReference
impl Eq for FieldReference
Source§impl PartialEq for FieldReference
impl PartialEq for FieldReference
impl StructuralPartialEq for FieldReference
Auto Trait Implementations§
impl Freeze for FieldReference
impl RefUnwindSafe for FieldReference
impl Send for FieldReference
impl Sync for FieldReference
impl Unpin for FieldReference
impl UnsafeUnpin for FieldReference
impl UnwindSafe for FieldReference
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