IEffect
trait · ferroui-base · v0.5.0
trait IEffect: 'static
A bitmap effect.
Implemented by the immutable effect types and, through an adapter, by
every class deriving from Effect: a handle of such a class converts to
Rc<dyn IEffect> with into(). The as_* members replace interface
casts (effect as IBlurEffect).
Members
as_anyas_objectas_blur_effectas_drop_shadow_effectas_direction_drop_shadow_effectas_mutable_effectas_custom_effectas_immutable_effectinto_immutable_effect
as_any
fn as_any(self: &Self) -> &dyn Any
The implementing value, for downcasts to immutable effect types. For
mutable effects use as_object.
as_object
fn as_object(self: &Self) -> Option<&FerroObject>
The object behind the effect when it is a mutable Effect.
as_blur_effect
fn as_blur_effect(self: &Self) -> Option<&dyn IBlurEffect>
The effect viewed as IBlurEffect, when it is one.
as_drop_shadow_effect
fn as_drop_shadow_effect(self: &Self) -> Option<&dyn IDropShadowEffect>
The effect viewed as IDropShadowEffect, when it is one.
as_direction_drop_shadow_effect
fn as_direction_drop_shadow_effect(self: &Self) -> Option<&dyn IDirectionDropShadowEffect>
The effect viewed as IDirectionDropShadowEffect, when it is one.
as_mutable_effect
fn as_mutable_effect(self: &Self) -> Option<&dyn IMutableEffect>
The effect viewed as IMutableEffect, when it is one.
as_custom_effect
fn as_custom_effect(self: &Self) -> Option<&ImmutableCustomEffect>
The effect as the snapshot of a custom effect, when it is one (#455,
not from upstream). A mutable custom effect class is not one; its
snapshot is EffectExtensions::to_custom_effect.
as_immutable_effect
fn as_immutable_effect(self: &Self) -> Option<&dyn IImmutableEffect>
The effect viewed as IImmutableEffect, when it is one.
into_immutable_effect
fn into_immutable_effect(self: Rc<Self>) -> Option<std::sync::Arc<dyn IImmutableEffect>>
The effect as an IImmutableEffect handle, when it is immutable: a
copy in a handle that can be shared with the render thread (immutable
effects are values and compare structurally).
Trait implementations
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.