struct StackEntry {
name: Option<String>,
array: Option<Vec<SaveFileValue>>,
map: Option<HashMap<String, SaveFileValue>>,
}
Expand description
A stack entry for the section parser. It serves two very important functions. First: it stores the name it should be saved under, or ‘None’ if it should be saved in parent as if the parent was an array. Second: it stores the values that are being parsed, as if the object was simultaneously an array and a map. This is then lazily evaluated into a homogeneous object. The object internals are lazily evaluated so performance cost for homogenous objects should be minimal
Fields§
§name: Option<String>
§array: Option<Vec<SaveFileValue>>
§map: Option<HashMap<String, SaveFileValue>>
Implementations§
Source§impl StackEntry
impl StackEntry
Trait Implementations§
Source§impl Clone for StackEntry
impl Clone for StackEntry
Source§fn clone(&self) -> StackEntry
fn clone(&self) -> StackEntry
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for StackEntry
impl Debug for StackEntry
Source§impl Into<SaveFileObject> for StackEntry
impl Into<SaveFileObject> for StackEntry
Source§fn into(self) -> SaveFileObject
fn into(self) -> SaveFileObject
Converts this type into the (usually inferred) input type.
Auto Trait Implementations§
impl Freeze for StackEntry
impl RefUnwindSafe for StackEntry
impl !Send for StackEntry
impl !Sync for StackEntry
impl Unpin for StackEntry
impl UnwindSafe for StackEntry
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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 more