pub struct EffectHandler {
pub name: String,
pub handles: EffectSet,
pub description: Option<String>,
}Expand description
An effect handler that can handle specific effects.
Fields§
§name: StringName of the handler
handles: EffectSetEffects that this handler can handle
description: Option<String>Description
Implementations§
Source§impl EffectHandler
impl EffectHandler
Sourcepub fn with_effect(self, effect: Effect) -> Self
pub fn with_effect(self, effect: Effect) -> Self
Add an effect that this handler handles.
Sourcepub fn with_description(self, description: impl Into<String>) -> Self
pub fn with_description(self, description: impl Into<String>) -> Self
Set the description.
Trait Implementations§
Source§impl Clone for EffectHandler
impl Clone for EffectHandler
Source§fn clone(&self) -> EffectHandler
fn clone(&self) -> EffectHandler
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for EffectHandler
impl RefUnwindSafe for EffectHandler
impl Send for EffectHandler
impl Sync for EffectHandler
impl Unpin for EffectHandler
impl UnwindSafe for EffectHandler
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