pub struct Icon { /* private fields */ }Expand description
An icon, drawn as a square.
Implementations§
Source§impl Icon
impl Icon
Sourcepub const DEFAULT_SIZE: u32 = 16
pub const DEFAULT_SIZE: u32 = 16
The default size in logical pixels.
Sourcepub fn new(source: impl IntoProp<IconSource>) -> Icon
pub fn new(source: impl IntoProp<IconSource>) -> Icon
An icon showing source: an icon name (&str), a file (&Path or
PathBuf), an IconSource, or a closure that returns one.
Trait Implementations§
Source§impl Widget for Icon
impl Widget for Icon
Source§fn into_element(self: Box<Self>) -> Element
fn into_element(self: Box<Self>) -> Element
Turns the description, and everything inside it, into the element
the window builds nodes from. It runs when the window is created or a
list item first appears, before the window’s tree is touched and
without recording what it reads, so it only describes.
Auto Trait Implementations§
impl !RefUnwindSafe for Icon
impl !Send for Icon
impl !Sync for Icon
impl !UnwindSafe for Icon
impl Forget for Icon
impl Freeze for Icon
impl Move for Icon
impl Unpin for Icon
impl UnsafeUnpin for Icon
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