FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    EffectExtensions

    struct · ferroui-base · v0.5.0

    struct EffectExtensions
    

    Extension methods for effects.

    View source

    Members

    get_effect_output_padding

    fn get_effect_output_padding(effect: Option<&dyn IEffect>) -> Thickness
    

    How far the output of the effect extends beyond the bounds of the content it is applied to. For a custom effect, the padding of its snapshot (ImmutableCustomEffect::padding).

    Panics for an effect of an unknown kind.

    Source

    to_custom_effect

    fn to_custom_effect(effect: &dyn IEffect) -> Option<ImmutableCustomEffect>
    

    The snapshot of a custom effect (#455, not from upstream): the effect itself when it is an ImmutableCustomEffect, the snapshot of its values when it is a custom effect class (Effect::construct_custom); None for the other effects.

    Source

    to_immutable

    fn to_immutable(effect: &Rc<dyn IEffect>) -> std::sync::Arc<dyn IImmutableEffect>
    

    Converts an effect to an immutable effect: the result of IMutableEffect::to_immutable if the effect is mutable, otherwise the effect itself.

    Source

    effect_equals

    fn effect_equals(immutable: Option<&dyn IImmutableEffect>, right: Option<&dyn IEffect>) -> bool
    

    Whether an immutable effect and another effect are both absent or structurally equal.

    Source

    Trait implementations

    • Send
    • Sync
    • Freeze
    • UnsafeUnpin
    • Unpin
    • UnwindSafe
    • RefUnwindSafe
    • ClassDefaults
    • Borrow<T>
    • BorrowMut<T>
    • Into<U>
    • From<T>
    • TryInto<U>
    • TryFrom<U>
    • Any
    • ErasedDestructor
    • IntoEither

    Availability

    Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.