[−][src]Struct iced_web::Element
A generic Widget
.
It is useful to build composable user interfaces that do not leak implementation details in their view logic.
If you have a built-in widget, you should be able to use Into<Element>
to turn it into an Element
.
Implementations
impl<'a, Message> Element<'a, Message>
[src]
pub fn new(widget: impl Widget<Message> + 'a) -> Self
[src]
pub fn map<F, B>(self, f: F) -> Element<'a, B> where
Message: 'static,
B: 'static,
F: 'static + Fn(Message) -> B,
[src]
Message: 'static,
B: 'static,
F: 'static + Fn(Message) -> B,
Applies a transformation to the produced message of the Element
.
This method is useful when you want to decouple different parts of your UI and make them composable.
pub fn explain(self, _color: Color) -> Element<'a, Message>
[src]
Marks the Element
as to-be-explained.
pub fn node<'b>(
&self,
bump: &'b Bump,
bus: &Bus<Message>,
style_sheet: &mut Css<'b>
) -> Node<'b>
[src]
&self,
bump: &'b Bump,
bus: &Bus<Message>,
style_sheet: &mut Css<'b>
) -> Node<'b>
Produces a VDOM node for the Element
.
Trait Implementations
impl<'a, Message> From<Button<'a, Message>> for Element<'a, Message> where
Message: 'static + Clone,
[src]
Message: 'static + Clone,
impl<'a, Message> From<Checkbox<Message>> for Element<'a, Message> where
Message: 'static,
[src]
Message: 'static,
impl<'a, Message> From<Column<'a, Message>> for Element<'a, Message> where
Message: 'static,
[src]
Message: 'static,
impl<'a, Message> From<Container<'a, Message>> for Element<'a, Message> where
Message: 'static,
[src]
Message: 'static,
impl<'a, Message> From<Image> for Element<'a, Message>
[src]
impl<'a, Message> From<ProgressBar> for Element<'a, Message> where
Message: 'static,
[src]
Message: 'static,
fn from(container: ProgressBar) -> Element<'a, Message>
[src]
impl<'a, Message> From<Radio<Message>> for Element<'a, Message> where
Message: 'static + Clone,
[src]
Message: 'static + Clone,
impl<'a, Message> From<Row<'a, Message>> for Element<'a, Message> where
Message: 'static,
[src]
Message: 'static,
impl<'a, Message> From<Scrollable<'a, Message>> for Element<'a, Message> where
Message: 'static,
[src]
Message: 'static,
fn from(scrollable: Scrollable<'a, Message>) -> Element<'a, Message>
[src]
impl<'a, T, Message> From<Slider<'a, T, Message>> for Element<'a, Message> where
T: 'static + Copy + Into<f64> + FromPrimitive,
Message: 'static,
[src]
T: 'static + Copy + Into<f64> + FromPrimitive,
Message: 'static,
impl<'a, Message> From<Space> for Element<'a, Message>
[src]
impl<'a, Message> From<TextInput<'a, Message>> for Element<'a, Message> where
Message: 'static + Clone,
[src]
Message: 'static + Clone,
Auto Trait Implementations
impl<'a, Message> !RefUnwindSafe for Element<'a, Message>
impl<'a, Message> !Send for Element<'a, Message>
impl<'a, Message> !Sync for Element<'a, Message>
impl<'a, Message> Unpin for Element<'a, Message>
impl<'a, Message> !UnwindSafe for Element<'a, Message>
Blanket Implementations
impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S where
D: AdaptFrom<S, Swp, Dwp, T>,
Dwp: WhitePoint,
Swp: WhitePoint,
T: Component + Float,
[src]
D: AdaptFrom<S, Swp, Dwp, T>,
Dwp: WhitePoint,
Swp: WhitePoint,
T: Component + Float,
fn adapt_into_using<M>(self, method: M) -> D where
M: TransformMatrix<Swp, Dwp, T>,
[src]
M: TransformMatrix<Swp, Dwp, T>,
fn adapt_into(self) -> D
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> ConvertInto<U> for T where
U: ConvertFrom<T>,
[src]
U: ConvertFrom<T>,
fn convert_into(self) -> U
[src]
fn convert_unclamped_into(self) -> U
[src]
fn try_convert_into(self) -> Result<U, OutOfBounds<U>>
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,