pub struct Cascader { /* private fields */ }Expand description
A menu of progressively revealed caller-owned option columns.
Implementations§
Source§impl Cascader
impl Cascader
pub fn new( ident: impl Into<Ident>, _window: &mut Window, cx: &mut Context<'_, Self>, ) -> Self
pub fn options(self, options: impl IntoIterator<Item = CascaderOption>) -> Self
pub fn selected(self, id: impl Into<SharedString>) -> Self
pub fn name(self, name: impl Into<SharedString>) -> Self
pub fn placeholder(self, placeholder: impl Into<SharedString>) -> Self
pub fn set_options( &mut self, options: Vec<CascaderOption>, cx: &mut Context<'_, Self>, )
pub fn set_selected( &mut self, selected: Option<SharedString>, cx: &mut Context<'_, Self>, )
pub fn set_name( &mut self, name: impl Into<SharedString>, cx: &mut Context<'_, Self>, )
pub fn set_placeholder( &mut self, placeholder: Option<SharedString>, cx: &mut Context<'_, Self>, )
pub fn set_disabled(&mut self, disabled: bool, cx: &mut Context<'_, Self>)
pub fn selected_id(&self) -> Option<&SharedString>
pub fn is_open(&self) -> bool
pub fn open_path(&self) -> &[SharedString]
Trait Implementations§
impl EventEmitter<CascaderEvent> for Cascader
Source§impl Focusable for Cascader
impl Focusable for Cascader
Source§fn focus_handle(&self, _cx: &App) -> FocusHandle
fn focus_handle(&self, _cx: &App) -> FocusHandle
Returns the focus handle associated with this view.
Auto Trait Implementations§
impl !RefUnwindSafe for Cascader
impl !UnwindSafe for Cascader
impl Freeze for Cascader
impl Send for Cascader
impl Sync for Cascader
impl Unpin for Cascader
impl UnsafeUnpin for Cascader
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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