pub enum FileEntry {
Header(SessionHeader),
RawHeader(Value),
Entry(SessionEntry),
}Expand description
Raw file line: header or tree entry.
Variants§
Header(SessionHeader)
Typed session header.
RawHeader(Value)
A type: "session" line that failed typed header parsing (preserved).
Entry(SessionEntry)
Non-header tree entry (typed or unknown).
Implementations§
Source§impl FileEntry
impl FileEntry
Sourcepub const fn is_session_header(&self) -> bool
pub const fn is_session_header(&self) -> bool
True when this line is a session header (type: "session").
Sourcepub const fn header(&self) -> Option<&SessionHeader>
pub const fn header(&self) -> Option<&SessionHeader>
Typed header when present.
Sourcepub const fn entry(&self) -> Option<&SessionEntry>
pub const fn entry(&self) -> Option<&SessionEntry>
Tree entry when present.
Sourcepub fn entry_mut(&mut self) -> Option<&mut SessionEntry>
pub fn entry_mut(&mut self) -> Option<&mut SessionEntry>
Mutable tree entry when present.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for FileEntry
impl<'de> Deserialize<'de> for FileEntry
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for FileEntry
Auto Trait Implementations§
impl Freeze for FileEntry
impl RefUnwindSafe for FileEntry
impl Send for FileEntry
impl Sync for FileEntry
impl Unpin for FileEntry
impl UnsafeUnpin for FileEntry
impl UnwindSafe for FileEntry
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreCreates a shared type from an unshared type.