pub struct Effect {
pub id: EffectId,
pub name: I18nString,
pub script: String,
pub icon_url: String,
pub icon: String,
pub code: String,
pub interval_ticks: Option<u64>,
pub required_attributes: Option<Vec<String>>,
pub events_subscribe: Option<Vec<String>>,
pub positive: bool,
}Fields§
§id: EffectId§name: I18nString§script: String§icon_url: String§icon: String§code: String§interval_ticks: Option<u64>§required_attributes: Option<Vec<String>>§events_subscribe: Option<Vec<String>>§positive: boolImplementations§
Source§impl Effect
impl Effect
pub fn has_at_least_one_required_attribute( &self, attributes: &EntityAttributes, ) -> bool
Trait Implementations§
Source§impl CustomType for Effect
impl CustomType for Effect
Source§fn build(builder: TypeBuilder<'_, Self>)
fn build(builder: TypeBuilder<'_, Self>)
Builds the custom type for use with the [
Engine]. Read moreSource§impl<'de> Deserialize<'de> for Effect
impl<'de> Deserialize<'de> for Effect
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
Source§impl JsonSchema for Effect
impl JsonSchema for Effect
Source§fn schema_name() -> String
fn schema_name() -> String
The name of the generated JSON Schema. Read more
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
§fn is_referenceable() -> bool
fn is_referenceable() -> bool
Whether JSON Schemas generated for this type should be re-used where possible using the
$ref keyword. Read moreSource§impl Tsify for Effect
impl Tsify for Effect
const DECL: &'static str = "export interface Effect {\n id: EffectId;\n name: I18nString;\n script: string;\n icon_url: string;\n icon: string;\n code: string;\n interval_ticks: number | null;\n required_attributes: string[] | null;\n events_subscribe: string[] | null;\n positive: boolean;\n}"
const SERIALIZATION_CONFIG: SerializationConfig
type JsType = JsType
fn into_js(&self) -> Result<Self::JsType, Error>where
Self: Serialize,
fn from_js<T>(js: T) -> Result<Self, Error>
impl Eq for Effect
impl StructuralPartialEq for Effect
Auto Trait Implementations§
impl Freeze for Effect
impl RefUnwindSafe for Effect
impl Send for Effect
impl Sync for Effect
impl Unpin for Effect
impl UnwindSafe for Effect
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