pub struct AnyViewBuilder<V = AnyView>(/* private fields */);Expand description
A builder for creating views from handler functions.
This struct wraps a boxed handler that produces AnyView instances.
Implementations§
Source§impl<V: View> AnyViewBuilder<V>
impl<V: View> AnyViewBuilder<V>
Sourcepub fn new(handler: impl ViewBuilder<Output = V>) -> Self
pub fn new(handler: impl ViewBuilder<Output = V>) -> Self
Creates a new ViewBuilder from a handler function.
§Arguments
handler- The function that builds a view from extracted parameters
Sourcepub fn erase(self) -> AnyViewBuilder<AnyView>
pub fn erase(self) -> AnyViewBuilder<AnyView>
Erases the specific view type, returning a builder that produces AnyView.
Trait Implementations§
Auto Trait Implementations§
impl<V> Freeze for AnyViewBuilder<V>
impl<V = AnyView> !RefUnwindSafe for AnyViewBuilder<V>
impl<V = AnyView> !Send for AnyViewBuilder<V>
impl<V = AnyView> !Sync for AnyViewBuilder<V>
impl<V> Unpin for AnyViewBuilder<V>
impl<V = AnyView> !UnwindSafe for AnyViewBuilder<V>
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