[][src]Struct iced::Node

pub struct Node(_);

The visual requirements of a Widget and its children.

When there have been changes and the Layout needs to be recomputed, the runtime obtains a Node by calling Widget::node.

Methods

impl Node[src]

pub fn new(style: Style) -> Node[src]

Creates a new Node with the given Style.

pub fn with_measure<F>(style: Style, measure: F) -> Node where
    F: 'static + Fn(Size<Number>) -> Size<f32>, 
[src]

Creates a new Node with the given Style and a measure function.

This type of node cannot have any children.

You should use this when your Widget can adapt its contents to the size of its container. The measure function will receive the container size as a parameter and must compute the size of the Node inside the given bounds (if the Number for a dimension is Undefined it means that it has no boundary).

pub fn with_children(style: Style, children: Vec<Node>) -> Node[src]

Creates a new Node with the given Style and children.

Trait Implementations

impl Debug for Node[src]

Auto Trait Implementations

impl !Sync for Node

impl !Send for Node

impl Unpin for Node

impl !UnwindSafe for Node

impl !RefUnwindSafe for Node

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,