pub enum Role {
Show 13 variants
Banner,
Navigation,
Main,
Complementary,
Contentinfo,
Search,
Form,
Region,
Button,
Dialog,
Alert,
Status,
Custom(String),
}Expand description
A landmark or widget role, for Element::set_role.
Winged-Swift accepts any string. This enum catches the typos while
Role::Custom keeps the door open for roles it does not know.
Variants§
Banner
role="banner" — the page header.
role="navigation".
Main
role="main".
Complementary
role="complementary" — a sidebar.
Contentinfo
role="contentinfo" — the page footer.
Search
role="search".
Form
role="form".
Region
role="region".
Button
role="button".
Dialog
role="dialog".
Alert
role="alert".
Status
role="status".
Custom(String)
Any other role, passed through verbatim.
Implementations§
Trait Implementations§
impl Eq for Role
impl StructuralPartialEq for Role
Auto Trait Implementations§
impl Freeze for Role
impl RefUnwindSafe for Role
impl Send for Role
impl Sync for Role
impl Unpin for Role
impl UnsafeUnpin for Role
impl UnwindSafe for Role
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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