Skip to main content

ComposeBuilder

Trait ComposeBuilder 

Source
pub trait ComposeBuilder {
    // Required method
    fn build(self, ctx: &BuildCtx<'_>) -> Widget;
}
Expand description

Trait to build a compose widget into widget tree with BuildCtx in the build phase. You should not implement this trait directly, implement Compose trait instead.

Required Methods§

Source

fn build(self, ctx: &BuildCtx<'_>) -> Widget

Trait Implementations§

Source§

impl<W: ComposeBuilder> FromAnother<W, &dyn ComposeBuilder> for Widget

Source§

fn from_another(value: W, ctx: &BuildCtx<'_>) -> Self

Blanket Implementations§

Source§

impl<P, C> SingleWithChild<C, dyn ComposeBuilder> for P
where P: SingleParent, C: ComposeBuilder,

Source§

type Target = Widget

Source§

fn with_child( self, child: C, ctx: &BuildCtx<'_>, ) -> <P as SingleWithChild<C, dyn ComposeBuilder>>::Target

Source§

impl<P, C> SingleWithChild<Option<C>, dyn ComposeBuilder> for P
where P: SingleParent + RenderBuilder, C: ComposeBuilder,

Source§

type Target = Widget

Source§

fn with_child( self, child: Option<C>, ctx: &BuildCtx<'_>, ) -> <P as SingleWithChild<Option<C>, dyn ComposeBuilder>>::Target

Source§

impl<P, V, PP> SingleWithChild<PP, &dyn ComposeBuilder> for P
where P: SingleParent, PP: InnerPipe<Value = Option<V>>, V: ComposeBuilder + 'static,

Source§

type Target = Widget

Source§

fn with_child( self, child: PP, ctx: &BuildCtx<'_>, ) -> <P as SingleWithChild<PP, &dyn ComposeBuilder>>::Target

Dyn Compatibility§

This trait is dyn compatible.

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

Implementations on Foreign Types§

Source§

impl<V: ComposeBuilder + 'static> ComposeBuilder for Box<dyn Pipe<Value = V>>

Source§

fn build(self, ctx: &BuildCtx<'_>) -> Widget

Implementors§

Source§

impl<C: Compose + 'static> ComposeBuilder for C

Source§

impl<T: ComposeBuilder> ComposeBuilder for FatObj<T>

Source§

impl<V, S, F> ComposeBuilder for FinalChain<V, S, F>
where V: ComposeBuilder + 'static, S: InnerPipe<Value = V>, F: FnOnce(BoxOp<'static, (ModifyScope, V), Infallible>) -> BoxOp<'static, (ModifyScope, V), Infallible> + 'static,

Source§

impl<V, S, F> ComposeBuilder for MapPipe<V, S, F>
where V: ComposeBuilder + 'static, S: InnerPipe, S::Value: 'static, F: FnMut(S::Value) -> V + 'static,