Struct zng::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> MatchNodeChildren<L>where
L: UiNodeList,
impl<L> MatchNodeChildren<L>where
L: UiNodeList,
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 for MatchNodeChildren<L>where
L: UiNodeList,
impl<L> UiNodeList for MatchNodeChildren<L>where
L: UiNodeList,
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 drain_into(&mut self, vec: &mut Vec<Box<dyn UiNodeBoxed>>)
fn drain_into(&mut self, vec: &mut Vec<Box<dyn UiNodeBoxed>>)
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,
) -> Size2D<Px, Px>
fn measure_each<F, S>( &mut self, wm: &mut WidgetMeasure, measure: F, fold_size: S, ) -> Size2D<Px, Px>
source§fn layout_each<F, S>(
&mut self,
wl: &mut WidgetLayout,
layout: F,
fold_size: S,
) -> Size2D<Px, Px>
fn layout_each<F, S>( &mut self, wl: &mut WidgetLayout, layout: F, fold_size: S, ) -> Size2D<Px, Px>
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>(self) -> Result<L, Box<dyn UiNodeListBoxed>>where
L: UiNodeList,
Self: Sized,
fn downcast_unbox<L>(self) -> Result<L, Box<dyn UiNodeListBoxed>>where
L: UiNodeList,
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> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§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> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§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