Skip to main content

IntoElement

Trait IntoElement 

Source
pub trait IntoElement: Sized {
    type Element: Element;

    // Required method
    fn into_element(self) -> Self::Element;

    // Provided method
    fn into_any_element(self) -> AnyElement { ... }
}
Expand description

Implemented by any type that can be converted into an element.

Required Associated Types§

Source

type Element: Element

The specific type of element into which the implementing type is converted. Useful for converting other types into elements automatically, like Strings

Required Methods§

Source

fn into_element(self) -> Self::Element

Convert self into a type that implements Element.

Provided Methods§

Source

fn into_any_element(self) -> AnyElement

Convert self into a dynamically-typed AnyElement.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl IntoElement for &'static str

Source§

type Element = &'static str

Source§

fn into_element(self) -> Self::Element

Source§

impl IntoElement for Cow<'static, str>

Source§

impl IntoElement for String

Implementors§

Source§

impl IntoElement for Anchored

Source§

impl IntoElement for AnyElement

Source§

impl IntoElement for AnyView

Source§

impl IntoElement for Deferred

Source§

impl IntoElement for Div

Source§

impl IntoElement for Empty

Source§

impl IntoElement for ImageCacheElement

Source§

impl IntoElement for Img

Source§

impl IntoElement for InteractiveText

Source§

impl IntoElement for List

Source§

impl IntoElement for MeasuredElement

Source§

impl IntoElement for SharedString

Source§

impl IntoElement for StyledText

Source§

impl IntoElement for Surface

Source§

impl IntoElement for Svg

Source§

impl IntoElement for Text

Source§

impl IntoElement for UniformList

Source§

impl<E: IntoElement + 'static> IntoElement for AnimationElement<E>

Source§

impl<E> IntoElement for Stateful<E>
where E: Element,

Source§

impl<T: 'static> IntoElement for Canvas<T>

Source§

impl<V: 'static + Render> IntoElement for Entity<V>