pub struct Tab { /* private fields */ }Expand description
One tab. With href it is a link (the page decides which is selected,
by selected or by matching the current path with the client runtime);
with children it is a panel the component script switches to.
Tab![key = "grades", title = "Grades", p!["…"]]
Implementations§
Source§impl Tab
impl Tab
pub fn new() -> Self
Sourcepub fn with(self, part: impl Part) -> Self
pub fn with(self, part: impl Part) -> Self
Add an attribute (class(..), id(..), aria(..), …) or a child.
Sourcepub fn key(self, v: impl Into<String>) -> Self
pub fn key(self, v: impl Into<String>) -> Self
Identifies the tab (Tabs![selected = key]); defaults to its index.
pub fn selected(self, v: bool) -> Self
pub fn disabled(self, v: bool) -> Self
Sourcepub fn start_content(self, v: impl View) -> Self
pub fn start_content(self, v: impl View) -> Self
An icon before the title.
Sourcepub fn end_content(self, v: impl View) -> Self
pub fn end_content(self, v: impl View) -> Self
A chip or count after the title.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Tab
impl !Sync for Tab
impl !UnwindSafe for Tab
impl Forget for Tab
impl Freeze for Tab
impl Move for Tab
impl Send for Tab
impl Unpin for Tab
impl UnsafeUnpin for Tab
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