Struct zng_app::widget::node::MatchNodeChildren
source · pub struct MatchNodeChildren<L> { /* private fields */ }
Expand description
Children node of match_node_list
.
When the closure does not delegate to this list the delegation happens after the closure returns. The
UiNodeList
methods that flag as delegated
are all the *_all
methods and the methods that access mutable
references to each child and the UiNodeList::with_node
. You can use the children
accessor to visit
children without flagging as delegated.
Implementations§
source§impl<L: UiNodeList> MatchNodeChildren<L>
impl<L: UiNodeList> MatchNodeChildren<L>
sourcepub fn delegated(&mut self)
pub fn delegated(&mut self)
Flags the current operation as delegated, stopping the default delegation after the closure ends.
Note that each *_all
method and the methods that give mutable access to children already flags this.
sourcepub fn has_delegated(&self) -> bool
pub fn has_delegated(&self) -> bool
If the current operation was already delegated to the children.
Trait Implementations§
source§impl<L: UiNodeList> UiNodeList for MatchNodeChildren<L>
impl<L: UiNodeList> UiNodeList for MatchNodeChildren<L>
source§fn with_node<R, F>(&mut self, index: usize, f: F) -> Rwhere
F: FnOnce(&mut BoxedUiNode) -> R,
fn with_node<R, F>(&mut self, index: usize, f: F) -> Rwhere
F: FnOnce(&mut BoxedUiNode) -> R,
Visit the specific node. Read more
source§fn for_each<F>(&mut self, f: F)
fn for_each<F>(&mut self, f: F)
Calls
f
for each node in the list with the index, sequentially.source§fn par_each<F>(&mut self, f: F)
fn par_each<F>(&mut self, f: F)
Calls
f
for each node in the list with the index, in parallel.source§fn par_fold_reduce<T, I, F, R>(&mut self, identity: I, fold: F, reduce: R) -> T
fn par_fold_reduce<T, I, F, R>(&mut self, identity: I, fold: F, reduce: R) -> T
Calls
fold
for each node in the list in parallel, with fold accumulators produced by identity
, then merges the folded results
using reduce
to produce the final value also in parallel. Read moresource§fn boxed(self) -> BoxedUiNodeList
fn boxed(self) -> BoxedUiNodeList
Gets
self
boxed, or itself if it is already boxed.source§fn drain_into(&mut self, vec: &mut Vec<BoxedUiNode>)
fn drain_into(&mut self, vec: &mut Vec<BoxedUiNode>)
Move all nodes into
vec
.source§fn deinit_all(&mut self)
fn deinit_all(&mut self)
Deinit the list in a context, all nodes are also deinited. Read more
source§fn update_all(
&mut self,
updates: &WidgetUpdates,
observer: &mut dyn UiNodeListObserver,
)
fn update_all( &mut self, updates: &WidgetUpdates, observer: &mut dyn UiNodeListObserver, )
Receive updates for the list in a context, all nodes are also updated. Read more
source§fn info_all(&mut self, info: &mut WidgetInfoBuilder)
fn info_all(&mut self, info: &mut WidgetInfoBuilder)
Rebuilds the list in a context, all node info is rebuilt.
source§fn event_all(&mut self, update: &EventUpdate)
fn event_all(&mut self, update: &EventUpdate)
Receive an event for the list in a context, all nodes are also notified. Read more
source§fn measure_each<F, S>(
&mut self,
wm: &mut WidgetMeasure,
measure: F,
fold_size: S,
) -> PxSize
fn measure_each<F, S>( &mut self, wm: &mut WidgetMeasure, measure: F, fold_size: S, ) -> PxSize
source§fn layout_each<F, S>(
&mut self,
wl: &mut WidgetLayout,
layout: F,
fold_size: S,
) -> PxSize
fn layout_each<F, S>( &mut self, wl: &mut WidgetLayout, layout: F, fold_size: S, ) -> PxSize
source§fn render_all(&mut self, frame: &mut FrameBuilder)
fn render_all(&mut self, frame: &mut FrameBuilder)
Render all nodes. Read more
source§fn render_update_all(&mut self, update: &mut FrameUpdate)
fn render_update_all(&mut self, update: &mut FrameUpdate)
Render all nodes. Read more
source§fn downcast_unbox<L: UiNodeList>(self) -> Result<L, BoxedUiNodeList>where
Self: Sized,
fn downcast_unbox<L: UiNodeList>(self) -> Result<L, BoxedUiNodeList>where
Self: Sized,
source§fn actual_type_id(&self) -> TypeId
fn actual_type_id(&self) -> TypeId
Returns the
type_id
of the unboxed list.Auto Trait Implementations§
impl<L> Freeze for MatchNodeChildren<L>where
L: Freeze,
impl<L> RefUnwindSafe for MatchNodeChildren<L>where
L: RefUnwindSafe,
impl<L> Send for MatchNodeChildren<L>where
L: Send,
impl<L> Sync for MatchNodeChildren<L>where
L: Sync,
impl<L> Unpin for MatchNodeChildren<L>where
L: Unpin,
impl<L> UnwindSafe for MatchNodeChildren<L>where
L: UnwindSafe,
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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 more