pub trait WhenBuilder: Sized {
// Required method
fn otherwise<P: Piece>(self, build_arm: impl Fn() -> P + 'static) -> Self;
}Expand description
Required Methods§
Sourcefn otherwise<P: Piece>(self, build_arm: impl Fn() -> P + 'static) -> Self
fn otherwise<P: Piece>(self, build_arm: impl Fn() -> P + 'static) -> Self
The arm built while the condition is false. Without it, false means “no subtree”.
The two arms need not return the same Piece type; each is erased to AnyPiece here.
Exactly one arm is mounted at a time, in its own child scope, so flipping disposes the
outgoing arm’s signals, bindings, and handlers before the incoming arm builds (§4.3).
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".