Struct ambient_api::prelude::TabBar
source · pub struct TabBar<T>{
pub tabs: Vec<T>,
pub value: T,
pub on_change: Arc<CbDebuggable<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: Arc<CbDebuggable<dyn Fn(T) + Sync + Send>>
The callback to call when a tab is selected. Called with the tab value.
Trait Implementations§
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.