Struct zng::update::UpdateDeliveryList
source · 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>) -> UpdateDeliveryList
pub fn new(subscribers: Box<dyn UpdateSubscribers>) -> UpdateDeliveryList
New list that only allows subscribers
.
sourcepub fn new_none() -> UpdateDeliveryList
pub fn new_none() -> UpdateDeliveryList
New list that does not allow any entry.
sourcepub fn new_any() -> UpdateDeliveryList
pub fn new_any() -> UpdateDeliveryList
New list that allows all entries.
This is the default value.
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
source§impl Default for UpdateDeliveryList
impl Default for UpdateDeliveryList
source§fn default() -> UpdateDeliveryList
fn default() -> 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> 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>
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>
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)
&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)
&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
source§impl<T> FsChangeNote for T
impl<T> FsChangeNote 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>
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§impl<T> NoneValue for Twhere
T: Default,
impl<T> NoneValue for Twhere
T: Default,
type NoneType = T
§fn null_value() -> T
fn null_value() -> T
§impl<T> NoneValue for Twhere
T: Default,
impl<T> NoneValue for Twhere
T: Default,
type NoneType = T
§fn null_value() -> T
fn null_value() -> T
§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_little_endian()
.