Enum ToolbarEvent
pub enum ToolbarEvent {
Show 13 variants
ToggleSidebar,
Back,
Forward,
Commit {
text: String,
},
Edit {
text: String,
},
Action {
id: String,
},
Search {
query: String,
},
SearchStep {
forward: bool,
},
SearchClose,
SearchOptions {
options: FindOptions,
},
SearchReplace {
with: String,
all: bool,
},
SearchCover {
cover: Option<WholeRect>,
},
History,
}Expand description
What the person did with the app’s slots in the bar.
Variants§
ToggleSidebar
The sidebar toggle was pressed.
Back
Forward
Commit
The location field was committed (Enter or the go button) with this text, exactly as typed; or a breadcrumb level or a suggestion was chosen, with its value.
Edit
The edited location’s text is now this: the app may answer with suggestions.
Action
An action button was pressed.
Search
The window’s search is open on the app with this query (empty when nothing is typed yet): highlight a document’s matches, or narrow a list. Sent when the search opens and whenever the query changes.
SearchStep
Step to the next (or previous) match in the document.
SearchClose
The window’s search closed: stop highlighting or narrowing.
SearchOptions
The document’s find options changed: find again under them. Sent before the query when they differ from the defaults a search opens with.
Fields
options: FindOptionsSearchReplace
Replace the current match in the document with with, or every
match (all), and find again.
SearchCover
The search’s options stand open over this much of the app’s window,
in its coordinates (None: they closed): the current match is shown
clear of them (crate::widget::Findable::set_find_cover).
History
The window’s History control was pressed: open History, or close it while it shows.
Implementations§
§impl ToolbarEvent
impl ToolbarEvent
pub fn bounded(self) -> ToolbarEvent
pub fn bounded(self) -> ToolbarEvent
The event as an app takes it: a committed text at most
MAX_TEXT_BYTES.
Trait Implementations§
§impl Clone for ToolbarEvent
impl Clone for ToolbarEvent
§fn clone(&self) -> ToolbarEvent
fn clone(&self) -> ToolbarEvent
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more§impl Debug for ToolbarEvent
impl Debug for ToolbarEvent
§impl<'de> Deserialize<'de> for ToolbarEvent
impl<'de> Deserialize<'de> for ToolbarEvent
§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ToolbarEvent, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ToolbarEvent, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
§impl PartialEq for ToolbarEvent
impl PartialEq for ToolbarEvent
§impl Serialize for ToolbarEvent
impl Serialize for ToolbarEvent
§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl Eq for ToolbarEvent
impl StructuralPartialEq for ToolbarEvent
Auto Trait Implementations§
impl Freeze for ToolbarEvent
impl RefUnwindSafe for ToolbarEvent
impl Send for ToolbarEvent
impl Sync for ToolbarEvent
impl Unpin for ToolbarEvent
impl UnsafeUnpin for ToolbarEvent
impl UnwindSafe for ToolbarEvent
Blanket Implementations§
§impl<T> AnyEq for T
impl<T> AnyEq for T
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§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> 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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§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