pub struct CustomWidgetRegistration {
pub name: &'static str,
pub template: &'static str,
}Expand description
One registered custom widget — wire-format name paired with the
Tera template that renders it. Submitted via register_widget!
and collected at startup by the inventory crate.
Fields§
§name: &'static strWire-format name. Matched against
[crate::widget::WidgetKind::Custom { name }] at render
time. Must be globally unique across the process — duplicate
registrations panic at boot via validate_registry.
template: &'static strTera template path used by the bundled _widget.html macro
via {% include template %}. The template receives the
active crate::widget::Widget as w.
Trait Implementations§
impl Collect for CustomWidgetRegistration
Auto Trait Implementations§
impl Forget for CustomWidgetRegistration
impl Freeze for CustomWidgetRegistration
impl RefUnwindSafe for CustomWidgetRegistration
impl Send for CustomWidgetRegistration
impl Sync for CustomWidgetRegistration
impl Unpin for CustomWidgetRegistration
impl UnsafeUnpin for CustomWidgetRegistration
impl UnwindSafe for CustomWidgetRegistration
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreCreates a shared type from an unshared type.