Icon

Struct Icon 

Source
pub struct Icon {
    pub props: Props,
    /* private fields */
}

Fields§

§props: Props

Trait Implementations§

Source§

impl ComponentExt for Icon

Source§

fn visible(&self) -> bool

Whether this component is visible or not.
Source§

fn height(&self) -> i32

The actual height of the component
Source§

fn width(&self) -> i32

The actual width of the component
Source§

fn set_visible(&self, visible: bool)

Set the visibility of this component.
Source§

fn add_class(&self, class: &str)

Add a CSS class to this component.
Source§

fn classes(&self) -> Vec<String>

Get the list of CSS classes of this component.
Source§

fn set_styles(&self, styles: Vec<Style>)

Set the crate::styles::Styles of this component. Read more
Source§

fn remove_class(&self, class: &str)

Remove a CSS from this component.
Source§

fn inner(&self) -> Rc<dyn Any>

Get the inner component (may be platform specific thing).
Source§

fn props(&self) -> &dyn ExtendingProps

Get the props of this component.
Source§

fn annotations<'a>(&'a self) -> Ref<'a, Annotations>

Get the annotations of this component.
Source§

fn annotations_mut<'a>(&'a self) -> RefMut<'a, Annotations>

Get a mutable ref to the annotations of this component.
Source§

fn try_annotations_mut<'a>( &'a self, ) -> Result<RefMut<'a, Annotations>, BorrowMutError>

Like annotations_mut but with a Result. Errors when the annotations can not be borrowed mutably.
Source§

fn children(&self) -> Ref<'_, Vec<Component>>

Get the children of this component.
Source§

fn children_mut(&self) -> RefMut<'_, Vec<Component>>

Get a mutable ref to the children of this component.
Source§

fn into_any(self: Rc<Self>) -> Rc<dyn Any>

Cast to any.
Source§

impl Debug for Icon

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl !Freeze for Icon

§

impl !RefUnwindSafe for Icon

§

impl !Send for Icon

§

impl !Sync for Icon

§

impl Unpin for Icon

§

impl !UnwindSafe for Icon

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V