pub struct Activity {
pub id: String,
pub weight: f64,
pub requires: Requires,
pub motion: Motion,
pub props: BTreeMap<String, PropDef>,
pub animation: AnimationDef,
pub effects_by_state: BTreeMap<String, Vec<String>>,
pub gif: Option<GifDef>,
pub unattended: Unattended,
}Fields§
§id: String§weight: f64§requires: Requires§motion: Motion§props: BTreeMap<String, PropDef>§animation: AnimationDef§effects_by_state: BTreeMap<String, Vec<String>>§gif: Option<GifDef>§unattended: UnattendedImplementations§
Source§impl Activity
impl Activity
Sourcepub fn fits(&self, a: &ArchetypeInfo, enabled_weather: &[String]) -> bool
pub fn fits(&self, a: &ArchetypeInfo, enabled_weather: &[String]) -> bool
Whether this activity can take place in an archetype, given enabled weather.
Sourcepub fn weathers_in(
&self,
a: &ArchetypeInfo,
enabled: &[String],
) -> Vec<&'static str>
pub fn weathers_in( &self, a: &ArchetypeInfo, enabled: &[String], ) -> Vec<&'static str>
Weather that the activity, the archetype and the user all allow.
Sourcepub fn times_in(&self, family: &[TimeOfDay]) -> Vec<TimeOfDay>
pub fn times_in(&self, family: &[TimeOfDay]) -> Vec<TimeOfDay>
Allowed times of day for one theme family, in canonical order.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Activity
impl<'de> Deserialize<'de> for Activity
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 StructuralPartialEq for Activity
Auto Trait Implementations§
impl Forget for Activity
impl Freeze for Activity
impl Move for Activity
impl RefUnwindSafe for Activity
impl Send for Activity
impl Sync for Activity
impl Unpin for Activity
impl UnsafeUnpin for Activity
impl UnwindSafe for Activity
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