Struct ambient_ui::tabs::TabBar
source · pub struct TabBar<T: ToString + PartialEq + Clone + Debug + Sync + Send + 'static> {
pub tabs: Vec<T>,
pub value: T,
pub on_change: Cb<dyn Fn(T) + Sync + Send>,
}
Expand description
A header bar of tabs. Does not contain the tab content.
Fields§
§tabs: Vec<T>
The tabs to display.
value: T
The currently selected tab.
on_change: Cb<dyn Fn(T) + Sync + Send>
The callback to call when a tab is selected. Called with the tab value.
Trait Implementations§
source§impl<T: Clone + ToString + PartialEq + Clone + Debug + Sync + Send + 'static> Clone for TabBar<T>
impl<T: Clone + ToString + PartialEq + Clone + Debug + Sync + Send + 'static> Clone for TabBar<T>
Auto Trait Implementations§
impl<T> !RefUnwindSafe for TabBar<T>
impl<T> Send for TabBar<T>
impl<T> Sync for TabBar<T>
impl<T> Unpin for TabBar<T>where
T: Unpin,
impl<T> !UnwindSafe for TabBar<T>
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> Downcast for T
impl<T> Downcast for T
source§impl<T> ElementComponentExt for Twhere
T: ElementComponent + 'static,
impl<T> ElementComponentExt for Twhere
T: ElementComponent + 'static,
source§impl<T> ElementComponentName for T
impl<T> ElementComponentName for T
source§fn element_component_name(&self) -> &'static str
fn element_component_name(&self) -> &'static str
Returns the name of the type implementing ElementComponent.