pub enum SearchPlacement {
Automatic,
Toolbar,
Inline,
}Expand description
Where a searchable surface’s field should be drawn.
A preference, not an instruction: a backend that cannot honor the request falls back to
whatever its platform does, exactly as SwiftUI’s searchable(placement:) does (“depending
on the containing view hierarchy and platform, the requested placement may not be able to
be fulfilled”). Automatic is the one to reach for: it is what lets the field live in the
window toolbar on a wide window and move into the navigation list on a narrow one.
Variants§
Automatic
The platform decides, from the window’s size class and its own convention.
Toolbar
In the window’s toolbar (NSSearchToolbarItem, an AdwHeaderBar entry, a
CommandBar AutoSuggestBox). Inline where the toolbar cannot hold a search field
(Cap::ToolbarSearch).
Inline
Attached to the navigation surface itself: above the sidebar list, or in the navigation bar’s search drawer on the phones.
Trait Implementations§
Source§impl Clone for SearchPlacement
impl Clone for SearchPlacement
Source§fn clone(&self) -> SearchPlacement
fn clone(&self) -> SearchPlacement
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more