pub struct IconArgs {
pub content: IconContent,
pub size: Dp,
pub width: Option<DimensionValue>,
pub height: Option<DimensionValue>,
pub tint: Color,
pub tint_mode: TintMode,
pub rotation: f32,
}Expand description
Arguments for the icon component.
Fields§
§content: IconContentIcon content, provided as either raster pixels or vector geometry.
size: DpLogical size of the icon. Applied to both width and height unless explicit overrides
are provided through width / height.
width: Option<DimensionValue>Optional width override. Handy when the icon should Fill or Wrap differently from
the default square sizing.
height: Option<DimensionValue>Optional height override. Handy when the icon should Fill or Wrap differently from
the default square sizing.
tint: ColorTint color applied to vector icons. Defaults to white so it preserves the original colors (multiplying by white is a no-op). Raster icons ignore this field.
tint_mode: TintModeHow the tint is applied to vector icons.
rotation: f32Rotation angle in degrees.
Trait Implementations§
Source§impl From<Arc<ImageVectorData>> for IconArgs
impl From<Arc<ImageVectorData>> for IconArgs
Source§fn from(data: Arc<ImageVectorData>) -> Self
fn from(data: Arc<ImageVectorData>) -> Self
Converts to this type from the input type.
Source§impl From<IconContent> for IconArgs
impl From<IconContent> for IconArgs
Source§fn from(content: IconContent) -> Self
fn from(content: IconContent) -> Self
Converts to this type from the input type.
Source§impl From<ImageVectorData> for IconArgs
impl From<ImageVectorData> for IconArgs
Source§fn from(data: ImageVectorData) -> Self
fn from(data: ImageVectorData) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for IconArgs
impl RefUnwindSafe for IconArgs
impl Send for IconArgs
impl Sync for IconArgs
impl Unpin for IconArgs
impl UnwindSafe for IconArgs
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§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>
Convert
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>
Convert
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)
Convert
&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)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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