Struct SourceRecord
pub struct SourceRecord<'a> {
pub line: usize,
pub context: RecordContext,
pub keyword: Cow<'a, str>,
pub value: Cow<'a, str>,
}Expand description
Comment or uninterpreted extension data, ordered by appearance in the source.
Fields§
§line: usizeOne-based source line.
context: RecordContextEnclosing section or record.
keyword: Cow<'a, str>Comment or the unrecognized keyword.
value: Cow<'a, str>Trimmed operand text; no interpretation or round-trip formatting guarantee.
Implementations§
§impl SourceRecord<'_>
impl SourceRecord<'_>
pub fn into_owned(self) -> SourceRecord<'static>
pub fn into_owned(self) -> SourceRecord<'static>
Detach the keyword and operand text from their source.
Trait Implementations§
§impl<'a> Clone for SourceRecord<'a>
impl<'a> Clone for SourceRecord<'a>
§fn clone(&self) -> SourceRecord<'a>
fn clone(&self) -> SourceRecord<'a>
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 more§impl<'a> Debug for SourceRecord<'a>
impl<'a> Debug for SourceRecord<'a>
impl<'a> Eq for SourceRecord<'a>
§impl<'a> PartialEq for SourceRecord<'a>
impl<'a> PartialEq for SourceRecord<'a>
§fn eq(&self, other: &SourceRecord<'a>) -> bool
fn eq(&self, other: &SourceRecord<'a>) -> bool
Tests for
self and other values to be equal, and is used by ==.impl<'a> StructuralPartialEq for SourceRecord<'a>
Auto Trait Implementations§
impl<'a> Freeze for SourceRecord<'a>
impl<'a> RefUnwindSafe for SourceRecord<'a>
impl<'a> Send for SourceRecord<'a>
impl<'a> Sync for SourceRecord<'a>
impl<'a> Unpin for SourceRecord<'a>
impl<'a> UnsafeUnpin for SourceRecord<'a>
impl<'a> UnwindSafe for SourceRecord<'a>
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