FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    CustomEffectRegistry

    struct · ferroui-base · v0.5.0

    struct CustomEffectRegistry
    

    The custom effects that effect strings can name.

    View source

    Members

    register

    fn register<T: CustomEffect>() -> Result<(), CustomEffectRegistrationError>
    

    Registers T under CustomEffect::NAME, and loads its graph (CustomEffect::graph) or its shader (CustomEffect::shader), which is registered for the prewarm. Registering a type again does nothing.

    Source

    is_registered

    fn is_registered(name: &str) -> bool
    

    Whether a custom effect is registered as name (ignoring case, - and _).

    Source

    names

    fn names() -> Vec<&'static str>
    

    The names of the registered custom effects, in the order of their registration.

    Source

    parse

    fn parse(s: &str) -> Option<Result<ImmutableCustomEffect, FormatError>>
    

    Parses an effect string that names a registered custom effect: name(parameter=value, ...), with the parameters of the effect in any order (a missing one keeps its default) and their values in the invariant format of EffectParameterValue. None when s is not of that form or names no registered effect.

    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.