pub enum LayerRole {
Base,
Raised,
Sticky,
Dropdown,
Popover,
Tooltip,
Modal,
Toast,
Overlay,
}Expand description
Semantic UI layer roles.
Variants§
Implementations§
Source§impl LayerRole
impl LayerRole
pub fn index(self) -> LayerIndex
Sourcepub fn sits_above(self, other: LayerRole) -> bool
pub fn sits_above(self, other: LayerRole) -> bool
Examples found in repository?
examples/ui_basic_usage.rs (line 20)
9fn main() {
10 let state = InteractionState::Focused;
11 let direction = Direction::Vertical;
12 let alignment = Alignment::Center;
13 let layer = LayerRole::Modal;
14 let theme = ThemeMode::Dark;
15 let affordance = Affordance::Clickable;
16
17 assert!(state.is_focus_visible_candidate());
18 assert_eq!(direction, Direction::Vertical);
19 assert_eq!(alignment, Alignment::Center);
20 assert!(layer.sits_above(LayerRole::Popover));
21 assert_eq!(theme, ThemeMode::Dark);
22 assert_eq!(affordance, Affordance::Clickable);
23}Trait Implementations§
Source§impl Ord for LayerRole
impl Ord for LayerRole
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialOrd for LayerRole
impl PartialOrd for LayerRole
impl Copy for LayerRole
impl Eq for LayerRole
impl StructuralPartialEq for LayerRole
Auto Trait Implementations§
impl Freeze for LayerRole
impl RefUnwindSafe for LayerRole
impl Send for LayerRole
impl Sync for LayerRole
impl Unpin for LayerRole
impl UnsafeUnpin for LayerRole
impl UnwindSafe for LayerRole
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