pub enum FileLine {
Header(SessionHeader),
Entry(SessionEntry),
}Expand description
One parsed line of a session file.
Variants§
Implementations§
Source§impl FileLine
impl FileLine
Sourcepub fn parse(line: &str) -> Result<Self, Error>
pub fn parse(line: &str) -> Result<Self, Error>
Parses one JSON line (header when type == "session").
§Errors
Returns the serde error when the line is not a valid header or entry.
Sourcepub fn from_value(value: JsonValue) -> Result<Self, Error>
pub fn from_value(value: JsonValue) -> Result<Self, Error>
Like FileLine::parse from an already parsed value.
§Errors
Returns the serde error when the value is not a valid header or entry.
Trait Implementations§
impl StructuralPartialEq for FileLine
Auto Trait Implementations§
impl Freeze for FileLine
impl RefUnwindSafe for FileLine
impl Send for FileLine
impl Sync for FileLine
impl Unpin for FileLine
impl UnsafeUnpin for FileLine
impl UnwindSafe for FileLine
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