#[non_exhaustive]pub struct GameOption {
pub flag: &'static str,
pub value: Option<&'static str>,
pub help: &'static str,
}Expand description
An option a game adds to frame-png. Build it with
GameOption::new (ADR-0039).
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.flag: &'static strThe flag (--light).
value: Option<&'static str>What its value is called in the usage text (NAME), if it takes
one.
help: &'static strWhat it does, for the usage text (lines after the first are indented under it).
Implementations§
Source§impl GameOption
impl GameOption
Sourcepub const fn new(flag: &'static str, help: &'static str) -> Self
pub const fn new(flag: &'static str, help: &'static str) -> Self
The flag flag, explained by help, taking no value
(with_value names one).
Sourcepub const fn with_value(self, value: Option<&'static str>) -> Self
pub const fn with_value(self, value: Option<&'static str>) -> Self
The option with its value called value in the usage text.
Trait Implementations§
Source§impl Clone for GameOption
impl Clone for GameOption
Source§fn clone(&self) -> GameOption
fn clone(&self) -> GameOption
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for GameOption
Source§impl Debug for GameOption
impl Debug for GameOption
impl Eq for GameOption
Source§impl From<&GameOption> for StartOption
impl From<&GameOption> for StartOption
Source§fn from(option: &GameOption) -> Self
fn from(option: &GameOption) -> Self
Converts to this type from the input type.
Source§impl PartialEq for GameOption
impl PartialEq for GameOption
impl StructuralPartialEq for GameOption
Auto Trait Implementations§
impl Freeze for GameOption
impl RefUnwindSafe for GameOption
impl Send for GameOption
impl Sync for GameOption
impl Unpin for GameOption
impl UnsafeUnpin for GameOption
impl UnwindSafe for GameOption
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,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.