pub struct Record {
pub line: usize,
pub tag: String,
pub fields: Vec<String>,
/* private fields */
}Expand description
One manifest line: a tag, then whitespace-separated fields.
Fields§
§line: usize1-based line number in manifest.txt.
tag: String§fields: Vec<String>Every field after the tag, k=v ones included.
Implementations§
Source§impl Record
impl Record
pub fn field_as<T: FromStr>(&self, i: usize) -> Result<T, Error>
Sourcepub fn rest(&self, n: usize) -> String
pub fn rest(&self, n: usize) -> String
The text after the first n fields (after the tag), spacing inside
it intact – for a free-text last field, such as a prompt.
pub fn has(&self, key: &str) -> bool
pub fn get<T: FromStr>(&self, key: &str) -> Result<T, Error>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Record
impl RefUnwindSafe for Record
impl Send for Record
impl Sync for Record
impl Unpin for Record
impl UnsafeUnpin for Record
impl UnwindSafe for Record
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