pub struct GameProgram {
pub package: String,
pub bin: Option<String>,
pub example: Option<String>,
pub features: Vec<String>,
pub args: Vec<String>,
}Expand description
The game’s tool program: a program of the game that runs
crate::main_with with the game’s crate::GameTools. shuyi
runs it with cargo run for the commands that need the game.
Fields§
§package: StringIts package.
bin: Option<String>Its binary, if the package has more than one.
example: Option<String>Or its example.
features: Vec<String>Features to build it with.
args: Vec<String>Arguments before the command’s.
Implementations§
Source§impl GameProgram
impl GameProgram
Sourcepub fn cargo_args(&self, command: &str, args: &[String]) -> Vec<String>
pub fn cargo_args(&self, command: &str, args: &[String]) -> Vec<String>
The cargo arguments that run command with args in it.
Sourcepub fn cargo_build_args(&self) -> Vec<String>
pub fn cargo_build_args(&self) -> Vec<String>
The cargo arguments that build it as Self::cargo_args runs
it, so that run has nothing left to compile.
Trait Implementations§
Source§impl Clone for GameProgram
impl Clone for GameProgram
Source§fn clone(&self) -> GameProgram
fn clone(&self) -> GameProgram
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 moreSource§impl Debug for GameProgram
impl Debug for GameProgram
Source§impl Default for GameProgram
impl Default for GameProgram
Source§fn default() -> GameProgram
fn default() -> GameProgram
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for GameProgramwhere
GameProgram: Default,
impl<'de> Deserialize<'de> for GameProgramwhere
GameProgram: Default,
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 Eq for GameProgram
Source§impl PartialEq for GameProgram
impl PartialEq for GameProgram
impl StructuralPartialEq for GameProgram
Auto Trait Implementations§
impl Freeze for GameProgram
impl RefUnwindSafe for GameProgram
impl Send for GameProgram
impl Sync for GameProgram
impl Unpin for GameProgram
impl UnsafeUnpin for GameProgram
impl UnwindSafe for GameProgram
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<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§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.