pub struct TextFilter { /* private fields */ }
Expand description
Helper to parse and apply text filters
Implementations§
Source§impl TextFilter
impl TextFilter
Sourcepub fn new(label: String) -> TextFilter
pub fn new(label: String) -> TextFilter
Creates a new TextFilter with an empty filter.
This is equivalent of new_with_filter with filter
set to ""
.
Sourcepub fn new_with_filter(label: String, filter: String) -> TextFilter
pub fn new_with_filter(label: String, filter: String) -> TextFilter
Creates a new TextFilter with a custom filter.
Sourcepub fn build(&self)
pub fn build(&self)
Builds the TextFilter with its filter attribute. You can use
pass_filter()
after it.
If you want control the filter with an InputText, check draw()
.
Sourcepub fn draw(&self)
pub fn draw(&self)
Draws an InputText to control the filter of the TextFilter.
This is equivalent of draw_with_size with size
set to 0.0
.
Sourcepub fn draw_with_size(&self, size: f32)
pub fn draw_with_size(&self, size: f32)
Draws an InputText to control the filter of the TextFilter.
The InputText has the size passed in parameters.
Sourcepub fn pass_filter(&self, buf: &str) -> bool
pub fn pass_filter(&self, buf: &str) -> bool
pub fn pass_filter_with_end(&self, start: &str, end: &str) -> bool
Auto Trait Implementations§
impl Freeze for TextFilter
impl RefUnwindSafe for TextFilter
impl !Send for TextFilter
impl !Sync for TextFilter
impl Unpin for TextFilter
impl UnwindSafe for TextFilter
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> 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