pub struct DirectorySetting {
pub meta: GameSettingMeta,
/* private fields */
}
Fields§
§meta: GameSettingMeta
Implementations§
Source§impl DirectorySetting
Refactor to clone less shit
Use std::mem::take for the comment and change parse_data_directory to accept &str
impl DirectorySetting
Refactor to clone less shit Use std::mem::take for the comment and change parse_data_directory to accept &str
Trait Implementations§
Source§impl Clone for DirectorySetting
impl Clone for DirectorySetting
Source§fn clone(&self) -> DirectorySetting
fn clone(&self) -> DirectorySetting
Returns a duplicate 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 DirectorySetting
impl Debug for DirectorySetting
Source§impl Display for DirectorySetting
This is tricky.
The trait implementation for GameSetting necessitates that all settings have a Display method.
However, DirectorySetting is reused interchangeably amongst variants that use a different key. So really the key should just be skipped here,
And handled by the upper SettingValue implementation?
But that, also, is fucked off, because then we wouldn’t be able to handle comments.
So the hope I guess is that the SettingValue itself can have an implementation to account for this.
That seems fair?
And then we just assume data= is the default in here.
impl Display for DirectorySetting
This is tricky. The trait implementation for GameSetting necessitates that all settings have a Display method. However, DirectorySetting is reused interchangeably amongst variants that use a different key. So really the key should just be skipped here, And handled by the upper SettingValue implementation? But that, also, is fucked off, because then we wouldn’t be able to handle comments. So the hope I guess is that the SettingValue itself can have an implementation to account for this. That seems fair? And then we just assume data= is the default in here.
Auto Trait Implementations§
impl Freeze for DirectorySetting
impl RefUnwindSafe for DirectorySetting
impl Send for DirectorySetting
impl Sync for DirectorySetting
impl Unpin for DirectorySetting
impl UnwindSafe for DirectorySetting
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