pub struct Effect {
pub id: EffectId,
pub name: I18nString,
pub behavior: Option<String>,
pub icon_url: String,
pub icon_path: String,
pub code: String,
pub interval_ticks: Option<u64>,
pub required_attributes: Option<Vec<String>>,
pub events_subscribe: Option<Vec<String>>,
pub positive: bool,
pub vfx_path: String,
pub duration: Option<i64>,
}Fields§
§id: EffectId§name: I18nString§behavior: Option<String>§icon_url: String§icon_path: String§code: String§interval_ticks: Option<u64>§required_attributes: Option<Vec<String>>§events_subscribe: Option<Vec<String>>§positive: bool§vfx_path: String§duration: Option<i64>Implementations§
Source§impl Effect
impl Effect
pub fn has_at_least_one_required_attribute( &self, attributes: &EntityAttributes, ) -> bool
Trait Implementations§
Source§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 behavior?: string | null;\n icon_url: string;\n icon_path: string;\n code: string;\n interval_ticks: number | null;\n required_attributes: string[] | null;\n events_subscribe: string[] | null;\n positive: boolean;\n vfx_path: string;\n duration?: number | null;\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