pub struct SearchField { /* private fields */ }Expand description
A query field, a hit count, and next and previous.
Implementations§
Source§impl SearchField
impl SearchField
pub fn new( ident: impl Into<Ident>, window: &mut Window, cx: &mut Context<'_, Self>, ) -> Self
pub fn placeholder(self, placeholder: impl Into<SharedString>) -> Self
Sourcepub fn match_case(self, on: bool) -> Self
pub fn match_case(self, on: bool) -> Self
Offers a match-case toggle in the state the host holds. Without a call there is no such control, because a control over a rule the host does not implement would report a change nothing acts on.
Sourcepub fn whole_word(self, on: bool) -> Self
pub fn whole_word(self, on: bool) -> Self
Offers a whole-word toggle in the state the host holds.
Sourcepub fn set_count(&mut self, count: HitCount, cx: &mut Context<'_, Self>)
pub fn set_count(&mut self, count: HitCount, cx: &mut Context<'_, Self>)
The count the host established. The field counts nothing itself.
pub fn count(&self) -> &HitCount
pub fn query_text(&self, cx: &App) -> SharedString
pub fn query_input(&self) -> &Entity<TextInput>
pub fn set_query( &mut self, text: impl Into<SharedString>, cx: &mut Context<'_, Self>, )
pub fn set_disabled(&mut self, disabled: bool, cx: &mut Context<'_, Self>)
Trait Implementations§
Source§impl Debug for SearchField
impl Debug for SearchField
impl EventEmitter<SearchFieldEvent> for SearchField
Source§impl Focusable for SearchField
impl Focusable for SearchField
Source§fn focus_handle(&self, _cx: &App) -> FocusHandle
fn focus_handle(&self, _cx: &App) -> FocusHandle
Returns the focus handle associated with this view.
Source§impl Render for SearchField
impl Render for SearchField
Auto Trait Implementations§
impl !RefUnwindSafe for SearchField
impl !Send for SearchField
impl !Sync for SearchField
impl !UnwindSafe for SearchField
impl Freeze for SearchField
impl Unpin for SearchField
impl UnsafeUnpin for SearchField
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