Skip to main content

Image

Struct Image 

Source
pub struct Image { /* private fields */ }

Implementations§

Source§

impl Image

Source

pub fn mark(self, name: &'static str) -> Self

Name a part of an explicit static plan; not a DOM id or data key.

Source

pub fn backend_options<T: 'static>(self, value: T) -> Self

Source§

impl Image

Source

pub fn class(self, value: impl Into<Vary<String>>) -> Self

Set the complete whitespace-separated class list (last call wins).

Source

pub fn class_fn(self, read: impl FnMut() -> String + 'static) -> Self

Compute one property directly in its pure Binding.

Source

pub fn style_fn(self, read: impl FnMut() -> Style + 'static) -> Self

Source

pub fn style(self, value: impl Into<Vary<Style>>) -> Self

Source

pub fn name(self, value: impl Into<Vary<String>>) -> Self

Accessible name. Plain inline/paragraph text uses content; decorative images have no accessible name. A named generic View becomes an accessible group without changing its layout box.

Source

pub fn focus(self, mode: impl Into<Vary<FocusMode>>) -> Self

Source

pub fn semantics(self, value: impl Into<Vary<Option<Box<Semantics>>>>) -> Self

Finite composite-widget state and document-scoped relations.

Source

pub fn on(self, kind: EventKind, handler: impl FnMut(Event) + 'static) -> Self

Source

pub fn node_ref(self, reference: Cage<Option<NodeId>>) -> Self

Publish the mounted semantic identity and clear it on retirement.

Source§

impl Image

Source

pub fn source(self, value: impl Into<Vary<String>>) -> Self

Source

pub fn responsive(self, value: ResponsiveImage) -> Self

Source

pub fn loading(self, value: ImageLoading) -> Self

Source

pub fn alt(self, value: impl Into<Vary<String>>) -> Self

Source

pub fn decorative(self) -> Self

Trait Implementations§

Source§

impl Default for Image

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Widget for Image

Source§

fn build(&mut self, scope: &Scope) -> Result

Source§

fn mount(self, parent: &Scope) -> Result<Mounted>
where Self: Sized,

Source§

fn show_in(self, parent: &Scope) -> Result
where Self: Sized,

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
where *const u8 is !null: Unpin, Rc<Vec<SelectEntry>>: Unpin, Rc<RichDocument>: Unpin, *const (): Unpin, Rc<dyn Any>: Unpin, Box<Semantics>: Unpin, *const LeafNode<Slot, Patch> is !null: Unpin, Box<(Slot, Patch)>: Unpin, *const LeafNode<Slot, Box<dyn FnOnce(&Scope) -> Result<(Patch, Box<dyn FnOnce(&Scope, NodeId) -> Result<(), Error>>), Error>>> is !null: Unpin, Box<(Slot, Box<dyn FnOnce(&Scope) -> Result<(Patch, Box<dyn FnOnce(&Scope, NodeId) -> Result<(), Error>>), Error>>)>: Unpin, *const LeafNode<EventKind, Box<dyn FnMut(Event)>> is !null: Unpin, Box<(EventKind, Box<dyn FnMut(Event)>)>: Unpin, Box<dyn Widget>: Unpin, Rc<Option<NodeId>>: Unpin, &'static str: Unpin,

§

impl UnsafeUnpin for Image

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<W> IntoChildren for W
where W: Widget,

Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.