pub struct BarActions<R: Resource> { /* private fields */ }Expand description
The window bar’s entries that invoke the resource’s actions and effects.
Implementations§
Source§impl<R: Resource> BarActions<R>
impl<R: Resource> BarActions<R>
Sourcepub fn new(dispatcher: Dispatcher<R>) -> Self
pub fn new(dispatcher: Dispatcher<R>) -> Self
Entries submitted through dispatcher: the window’s own.
Sourcepub fn dispatcher(&self) -> &Dispatcher<R>
pub fn dispatcher(&self) -> &Dispatcher<R>
The window’s dispatcher, which these entries are submitted through.
Sourcepub fn action(&self, submit: impl Submit<R>) -> ToolbarAction
pub fn action(&self, submit: impl Submit<R>) -> ToolbarAction
The entry that submits submit (a verb, a field edit), named and
pictured as its action is declared; a field edit, declared by no
verb, has neither and is named by the app. Disabled where the
participant may not take it.
Sourcepub fn effect<E: Effect>(&self, effect: &E) -> ToolbarAction
pub fn effect<E: Effect>(&self, effect: &E) -> ToolbarAction
The entry that invokes effect, named and pictured as it is
declared, and answered by whoever answers the effect (a view effect
by the window’s surface). Disabled where the participant may not
take it.
Sourcepub fn press(&self, event: &ToolbarEvent) -> bool
pub fn press(&self, event: &ToolbarEvent) -> bool
Submit what event presses when it presses one of these entries.
Returns whether it was a press on one (then it is handled, even when
the entry is gone), so the app’s own slots never see it.
Auto Trait Implementations§
impl<R> !Freeze for BarActions<R>
impl<R> !RefUnwindSafe for BarActions<R>
impl<R> !Send for BarActions<R>
impl<R> !Sync for BarActions<R>
impl<R> Unpin for BarActions<R>
impl<R> UnsafeUnpin for BarActions<R>
impl<R> !UnwindSafe for BarActions<R>
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> 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>, 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>
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)
&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> 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