pub struct Part {
pub id: String,
pub when: When,
pub files: PathBuf,
pub modules: Vec<String>,
pub targets: Vec<String>,
pub stage: Option<String>,
pub requires: Vec<String>,
pub conflicts: Vec<String>,
}Expand description
A part of a template: a folder of files, what they turn on, and when they are written.
Fields§
§id: StringIts id, which requires and conflicts name.
when: WhenWhen it applies.
files: PathBufIts folder, from the template’s: its files are written from there into the game’s folder.
modules: Vec<String>The engine’s modules it turns on (physics), as shuyi add does.
targets: Vec<String>The targets it ships on (web).
stage: Option<String>The stage it adds, if any (top-down-grid): its module is
crates/game/src/stages/<stage, with _for->.rs.
requires: Vec<String>The parts it needs picked too.
conflicts: Vec<String>The parts it can’t be picked with.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Part
impl<'de> Deserialize<'de> for Part
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 Part
impl StructuralPartialEq for Part
Auto Trait Implementations§
impl Freeze for Part
impl RefUnwindSafe for Part
impl Send for Part
impl Sync for Part
impl Unpin for Part
impl UnsafeUnpin for Part
impl UnwindSafe for Part
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.