pub struct UpdateDeliveryList { /* private fields */ }
Expand description
Represents all the widgets and windows marked to receive an update.
Implementations§
source§impl UpdateDeliveryList
impl UpdateDeliveryList
sourcepub fn new(subscribers: Box<dyn UpdateSubscribers>) -> Self
pub fn new(subscribers: Box<dyn UpdateSubscribers>) -> Self
New list that only allows subscribers
.
sourcepub fn insert_wgt(&mut self, wgt: &impl WidgetPathProvider)
pub fn insert_wgt(&mut self, wgt: &impl WidgetPathProvider)
Insert the wgt
and ancestors up-to the inner most that is included in the subscribers.
sourcepub fn insert_window(&mut self, id: WindowId)
pub fn insert_window(&mut self, id: WindowId)
Insert the window by itself, the window root widget will be targeted.
sourcepub fn search_all(&mut self)
pub fn search_all(&mut self)
Register all subscribers for search and delivery.
sourcepub fn search_widget(&mut self, widget_id: WidgetId)
pub fn search_widget(&mut self, widget_id: WidgetId)
Register the widget of unknown location for search before delivery routing starts.
sourcepub fn has_pending_search(&mut self) -> bool
pub fn has_pending_search(&mut self) -> bool
If the list has pending widgets that must be found before delivery can start.
sourcepub fn fulfill_search<'a, 'b>(
&'a mut self,
windows: impl Iterator<Item = &'b WidgetInfoTree>,
)
pub fn fulfill_search<'a, 'b>( &'a mut self, windows: impl Iterator<Item = &'b WidgetInfoTree>, )
Search all pending widgets in all windows
, all search items are cleared, even if not found.
sourcepub fn enter_window(&self, window_id: WindowId) -> bool
pub fn enter_window(&self, window_id: WindowId) -> bool
Returns true
if the window is on the list.
sourcepub fn enter_widget(&self, widget_id: WidgetId) -> bool
pub fn enter_widget(&self, widget_id: WidgetId) -> bool
Returns true
if the widget is on the list.
sourcepub fn widgets(&self) -> &IdSet<WidgetId>
pub fn widgets(&self) -> &IdSet<WidgetId>
Found widgets in the delivery list, can be targets or ancestors of targets.
sourcepub fn search_widgets(&mut self) -> &IdSet<WidgetId>
pub fn search_widgets(&mut self) -> &IdSet<WidgetId>
Widgets still pending search or not found.
sourcepub fn search_root(&mut self) -> bool
pub fn search_root(&mut self) -> bool
If search for window a root is pending.
Trait Implementations§
source§impl Debug for UpdateDeliveryList
impl Debug for UpdateDeliveryList
Auto Trait Implementations§
impl Freeze for UpdateDeliveryList
impl !RefUnwindSafe for UpdateDeliveryList
impl Send for UpdateDeliveryList
impl Sync for UpdateDeliveryList
impl Unpin for UpdateDeliveryList
impl !UnwindSafe for UpdateDeliveryList
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
§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>
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>
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