pub struct ChipBuilder { /* private fields */ }Expand description
Configuration handle returned by chip.
Implementations§
Source§impl ChipBuilder
impl ChipBuilder
Sourcepub fn assist(&self, label: impl Into<String>) -> Self
pub fn assist(&self, label: impl Into<String>) -> Self
Applies the assist chip preset and updates the visible label.
Sourcepub fn suggestion(&self, label: impl Into<String>) -> Self
pub fn suggestion(&self, label: impl Into<String>) -> Self
Applies the suggestion chip preset and updates the visible label.
Sourcepub fn filter(&self, label: impl Into<String>) -> Self
pub fn filter(&self, label: impl Into<String>) -> Self
Applies the filter chip preset and updates the visible label.
Sourcepub fn input(&self, label: impl Into<String>) -> Self
pub fn input(&self, label: impl Into<String>) -> Self
Applies the input chip preset and updates the visible label.
Sourcepub fn leading_icon(&self, icon: impl Into<Painter>) -> Self
pub fn leading_icon(&self, icon: impl Into<Painter>) -> Self
Sets the leading icon content using any supported icon source.
Sourcepub fn clear_leading_icon(&self) -> Self
pub fn clear_leading_icon(&self) -> Self
Clears the leading icon content.
Sourcepub fn trailing_icon(&self, icon: impl Into<Painter>) -> Self
pub fn trailing_icon(&self, icon: impl Into<Painter>) -> Self
Sets the trailing icon content using any supported icon source.
Sourcepub fn clear_trailing_icon(&self) -> Self
pub fn clear_trailing_icon(&self) -> Self
Clears the trailing icon content.
Source§impl ChipBuilder
impl ChipBuilder
Sourcepub fn variant(&self, value: ChipVariant) -> Self
pub fn variant(&self, value: ChipVariant) -> Self
Configure variant before this component executes.
Sourcepub fn variant_optional(&self, value: Option<ChipVariant>) -> Self
pub fn variant_optional(&self, value: Option<ChipVariant>) -> Self
Configure variant before this component executes.
Sourcepub fn style_optional(&self, value: Option<ChipStyle>) -> Self
pub fn style_optional(&self, value: Option<ChipStyle>) -> Self
Configure style before this component executes.
Sourcepub fn label(&self, value: impl Into<String>) -> Self
pub fn label(&self, value: impl Into<String>) -> Self
Configure label before this component executes.
Sourcepub fn label_optional(&self, value: Option<String>) -> Self
pub fn label_optional(&self, value: Option<String>) -> Self
Configure label before this component executes.
Sourcepub fn avatar(&self, value: impl Into<Painter>) -> Self
pub fn avatar(&self, value: impl Into<Painter>) -> Self
Configure avatar before this component executes.
Sourcepub fn avatar_optional(&self, value: Option<Painter>) -> Self
pub fn avatar_optional(&self, value: Option<Painter>) -> Self
Configure avatar before this component executes.
Sourcepub fn selected_optional(&self, value: Option<bool>) -> Self
pub fn selected_optional(&self, value: Option<bool>) -> Self
Configure selected before this component executes.
Sourcepub fn enabled_optional(&self, value: Option<bool>) -> Self
pub fn enabled_optional(&self, value: Option<bool>) -> Self
Configure enabled before this component executes.
Sourcepub fn modifier(&self, value: Modifier) -> Self
pub fn modifier(&self, value: Modifier) -> Self
Configure modifier before this component executes.
Sourcepub fn modifier_optional(&self, value: Option<Modifier>) -> Self
pub fn modifier_optional(&self, value: Option<Modifier>) -> Self
Configure modifier before this component executes.
Sourcepub fn colors(&self, value: ChipColors) -> Self
pub fn colors(&self, value: ChipColors) -> Self
Configure colors before this component executes.
Sourcepub fn colors_optional(&self, value: Option<ChipColors>) -> Self
pub fn colors_optional(&self, value: Option<ChipColors>) -> Self
Configure colors before this component executes.
Sourcepub fn border(&self, value: ChipBorder) -> Self
pub fn border(&self, value: ChipBorder) -> Self
Configure border before this component executes.
Sourcepub fn border_optional(&self, value: Option<ChipBorder>) -> Self
pub fn border_optional(&self, value: Option<ChipBorder>) -> Self
Configure border before this component executes.
Sourcepub fn shape_optional(&self, value: Option<Shape>) -> Self
pub fn shape_optional(&self, value: Option<Shape>) -> Self
Configure shape before this component executes.
Sourcepub fn shape_style(&self, value: ChipShapeStyle) -> Self
pub fn shape_style(&self, value: ChipShapeStyle) -> Self
Configure shape_style before this component executes.
Sourcepub fn shape_style_optional(&self, value: Option<ChipShapeStyle>) -> Self
pub fn shape_style_optional(&self, value: Option<ChipShapeStyle>) -> Self
Configure shape_style before this component executes.
Sourcepub fn elevation_optional(&self, value: Option<Dp>) -> Self
pub fn elevation_optional(&self, value: Option<Dp>) -> Self
Configure elevation before this component executes.
Configure on_click before this component executes.
Sourcepub fn on_click_optional(&self, value: Option<Callback>) -> Self
pub fn on_click_optional(&self, value: Option<Callback>) -> Self
Configure on_click before this component executes.
Sourcepub fn on_remove<F>(&self, value: F) -> Self
pub fn on_remove<F>(&self, value: F) -> Self
Configure on_remove before this component executes.
Configure on_remove before this component executes.
Sourcepub fn on_remove_optional(&self, value: Option<Callback>) -> Self
pub fn on_remove_optional(&self, value: Option<Callback>) -> Self
Configure on_remove before this component executes.
Sourcepub fn remove_accessibility_label(&self, value: impl Into<String>) -> Self
pub fn remove_accessibility_label(&self, value: impl Into<String>) -> Self
Configure remove_accessibility_label before this component executes.
Sourcepub fn remove_accessibility_label_optional(&self, value: Option<String>) -> Self
pub fn remove_accessibility_label_optional(&self, value: Option<String>) -> Self
Configure remove_accessibility_label before this component executes.
Sourcepub fn accessibility_label(&self, value: impl Into<String>) -> Self
pub fn accessibility_label(&self, value: impl Into<String>) -> Self
Configure accessibility_label before this component executes.
Sourcepub fn accessibility_label_optional(&self, value: Option<String>) -> Self
pub fn accessibility_label_optional(&self, value: Option<String>) -> Self
Configure accessibility_label before this component executes.
Sourcepub fn accessibility_description(&self, value: impl Into<String>) -> Self
pub fn accessibility_description(&self, value: impl Into<String>) -> Self
Configure accessibility_description before this component executes.
Sourcepub fn accessibility_description_optional(&self, value: Option<String>) -> Self
pub fn accessibility_description_optional(&self, value: Option<String>) -> Self
Configure accessibility_description before this component executes.
Auto Trait Implementations§
impl Freeze for ChipBuilder
impl RefUnwindSafe for ChipBuilder
impl Send for ChipBuilder
impl Sync for ChipBuilder
impl Unpin for ChipBuilder
impl UnsafeUnpin for ChipBuilder
impl UnwindSafe for ChipBuilder
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.