Skip to main content

is_widget_builder_method

Function is_widget_builder_method 

Source
pub fn is_widget_builder_method(name: &str) -> bool
Expand description

Returns true if name is a method on WidgetBuilder (or the inherent impl on WidgetWithHandlers). These methods wrap the widget in WidgetWithHandlers<T>, which doesn’t expose per-widget builder methods. The lowering reorders handler-attachment items to come AFTER every widget-specific item so users can write them in any order without hitting “no method named child found for WidgetWithHandlers<T>”.

Membership is decided by the return type: a WidgetBuilder method returning WidgetWithHandlers<Self> belongs here, because that return is what breaks the chain. The teksilo-teksu-guard crate parses crates/teksilo-core/src/widget_builder.rs and fails the build when a wrapping method is absent from the list below, so this is not kept in step by discipline.