pub struct Image { /* private fields */ }Expand description
A picture from a PNG, JPEG, GIF (its first frame), WebP or SVG file, drawn at a fixed size.
Implementations§
Source§impl Image
impl Image
Sourcepub const DEFAULT_SIZE: u32 = 64
pub const DEFAULT_SIZE: u32 = 64
The default width and height in logical pixels.
Sourcepub fn new(source: impl IntoProp<PathBuf>) -> Image
pub fn new(source: impl IntoProp<PathBuf>) -> Image
An image of the file at source: a path (&str, String, &Path
or PathBuf) or a closure that returns one.
Trait Implementations§
Source§impl Widget for Image
impl Widget for Image
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 Image
impl !Send for Image
impl !Sync for Image
impl !UnwindSafe for Image
impl Forget for Image
impl Freeze for Image
impl Move for Image
impl Unpin for Image
impl UnsafeUnpin for Image
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