pub enum SaveFileObject {
Map(HashMap<String, SaveFileValue>),
Array(Vec<SaveFileValue>),
}
Expand description
An object that comes from a save file.
Variants§
Map(HashMap<String, SaveFileValue>)
An object that stores values as a map.
Array(Vec<SaveFileValue>)
An object that stores values as an array.
Implementations§
Source§impl SaveFileObject
impl SaveFileObject
Sourcepub fn as_map(&self) -> Result<&HashMap<String, SaveFileValue>, ConversionError>
pub fn as_map(&self) -> Result<&HashMap<String, SaveFileValue>, ConversionError>
Sourcepub fn as_array(&self) -> Result<&Vec<SaveFileValue>, ConversionError>
pub fn as_array(&self) -> Result<&Vec<SaveFileValue>, ConversionError>
Trait Implementations§
Source§impl Clone for SaveFileObject
impl Clone for SaveFileObject
Source§fn clone(&self) -> SaveFileObject
fn clone(&self) -> SaveFileObject
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 SaveFileObject
impl Debug for SaveFileObject
Source§impl From<SaveFileObject> for SaveFileValue
impl From<SaveFileObject> for SaveFileValue
Source§fn from(value: SaveFileObject) -> Self
fn from(value: SaveFileObject) -> Self
Converts to this type from the input type.
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.
Source§impl PartialEq for SaveFileObject
impl PartialEq for SaveFileObject
impl StructuralPartialEq for SaveFileObject
Auto Trait Implementations§
impl Freeze for SaveFileObject
impl RefUnwindSafe for SaveFileObject
impl !Send for SaveFileObject
impl !Sync for SaveFileObject
impl Unpin for SaveFileObject
impl UnwindSafe for SaveFileObject
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