pub struct FieldList {
pub line: usize,
/* private fields */
}Expand description
The ordered fields in effect for a run of records (§5).
Fields§
§line: usize1-based source line of the !fields line (0 when synthesised).
Implementations§
Source§impl FieldList
impl FieldList
Sourcepub fn new(fields: Vec<FieldDecl>) -> FieldList
pub fn new(fields: Vec<FieldDecl>) -> FieldList
Build a field list, precomputing its arity.
No validation is performed here; parse_lines rejects duplicate
names and the other §11.1 conditions while reading the !fields line.
Sourcepub fn source(&self) -> &str
pub fn source(&self) -> &str
The !fields line exactly as it appeared in the document, trimmed of
surrounding whitespace — empty for a programmatically built list.
A tool that splits or concatenates documents (§15.3) has to re-emit the
field list in effect at the split point; replaying the original bytes
keeps the shards byte-identical to the source, which re-deriving the
declaration from FieldList::fields would not (§14 normalises the
separator to ; and drops the author’s spacing).
Trait Implementations§
impl StructuralPartialEq for FieldList
Auto Trait Implementations§
impl Freeze for FieldList
impl RefUnwindSafe for FieldList
impl Send for FieldList
impl Sync for FieldList
impl Unpin for FieldList
impl UnsafeUnpin for FieldList
impl UnwindSafe for FieldList
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