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§
fn component_name() -> &'static str
Provided Methods§
fn url_fields() -> &'static [UrlFieldMeta]
Sourcefn locked_fields() -> &'static [&'static str]
fn locked_fields() -> &'static [&'static str]
Field names annotated with #[locked] — protected from client-side modification.
Sourcefn layout_name() -> Option<&'static str>
fn layout_name() -> Option<&'static str>
Named layout for this component (from #[layout("name")]).
Returns None to use the default layout.
Sourcefn event_listeners() -> &'static [EventListenerMeta]
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".