Struct Views
pub struct Views<H> { /* private fields */ }Expand description
The views a desktop runs for the windows that embed them, by the view.
Implementations§
§impl<H> Views<H>where
H: LiveView,
impl<H> Views<H>where
H: LiveView,
pub fn follow<'a>(
&mut self,
wanted: impl IntoIterator<Item = &'a ResourceView>,
now: Instant,
start: impl FnMut(&ResourceView) -> Result<H, String>,
) -> Followed<H>
pub fn follow<'a>( &mut self, wanted: impl IntoIterator<Item = &'a ResourceView>, now: Instant, start: impl FnMut(&ResourceView) -> Result<H, String>, ) -> Followed<H>
Run exactly the wanted views at now: drop the ones no longer
wanted, start the ones newly wanted with start, and start again
each one that has not shown for RETRY.
pub fn state(&self, view: &ResourceView) -> Option<EmbedState>
pub fn state(&self, view: &ResourceView) -> Option<EmbedState>
How view is coming along, while it is run.
pub fn retry_deadline(&self) -> Option<Instant>
pub fn retry_deadline(&self) -> Option<Instant>
The soonest a view that could not show is tried again.
pub fn get_mut(&mut self, view: &ResourceView) -> Option<&mut H>
pub fn get_mut(&mut self, view: &ResourceView) -> Option<&mut H>
What runs view, while it runs.
pub fn running(&self) -> impl Iterator<Item = (&ResourceView, &H)>
pub fn running(&self) -> impl Iterator<Item = (&ResourceView, &H)>
Every running view.
pub fn running_mut(&mut self) -> impl Iterator<Item = (&ResourceView, &mut H)>
pub fn running_mut(&mut self) -> impl Iterator<Item = (&ResourceView, &mut H)>
Every running view, to drive.
Trait Implementations§
Auto Trait Implementations§
impl<H> Freeze for Views<H>
impl<H> RefUnwindSafe for Views<H>where
H: RefUnwindSafe,
impl<H> Send for Views<H>where
H: Send,
impl<H> Sync for Views<H>where
H: Sync,
impl<H> Unpin for Views<H>where
H: Unpin,
impl<H> UnsafeUnpin for Views<H>
impl<H> UnwindSafe for Views<H>where
H: 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> 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>
Converts
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn 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>
Converts
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which 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)
Converts
&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)
Converts
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSend for T
impl<T> DowncastSend for T
§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§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> 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§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
The none-equivalent value.