Skip to main content

ComponentMeta

Trait ComponentMeta 

Source
pub trait ComponentMeta {
    // Required method
    fn component_name() -> &'static str;

    // Provided methods
    fn url_fields() -> &'static [UrlFieldMeta] { ... }
    fn locked_fields() -> &'static [&'static str] { ... }
    fn layout_name() -> Option<&'static str> { ... }
    fn event_listeners() -> &'static [EventListenerMeta] { ... }
}
Expand description

Auto-implemented by the derive macro to provide the component’s wire name.

Required Methods§

Source

fn component_name() -> &'static str

Provided Methods§

Source

fn url_fields() -> &'static [UrlFieldMeta]

Source

fn locked_fields() -> &'static [&'static str]

Field names annotated with #[locked] — protected from client-side modification.

Source

fn layout_name() -> Option<&'static str>

Named layout for this component (from #[layout("name")]). Returns None to use the default layout.

Source

fn event_listeners() -> &'static [EventListenerMeta]

Event listeners registered via #[on("event")] on action methods.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§