[][src]Struct expanse::node::Stretch

pub struct Stretch { /* fields omitted */ }

Implementations

impl Stretch[src]

pub fn new() -> Self[src]

pub fn with_capacity(capacity: usize) -> Self[src]

pub fn new_leaf(
    &mut self,
    style: Style,
    measure: MeasureFunc
) -> Result<Node, Error>
[src]

pub fn new_node(
    &mut self,
    style: Style,
    children: &[Node]
) -> Result<Node, Error>
[src]

pub fn clear(&mut self)[src]

Removes all nodes.

All associated nodes will be invalid.

pub fn remove(&mut self, node: Node)[src]

Remove nodes.

pub fn set_measure(
    &mut self,
    node: Node,
    measure: Option<MeasureFunc>
) -> Result<(), Error>
[src]

pub fn add_child(&mut self, node: Node, child: Node) -> Result<(), Error>[src]

pub fn set_children(
    &mut self,
    node: Node,
    children: &[Node]
) -> Result<(), Error>
[src]

pub fn remove_child(&mut self, node: Node, child: Node) -> Result<Node, Error>[src]

pub fn remove_child_at_index(
    &mut self,
    node: Node,
    index: usize
) -> Result<Node, Error>
[src]

pub fn replace_child_at_index(
    &mut self,
    node: Node,
    index: usize,
    child: Node
) -> Result<Node, Error>
[src]

pub fn children(&self, node: Node) -> Result<Vec<Node>, Error>[src]

pub fn child_at_index(&self, node: Node, index: usize) -> Result<Node, Error>[src]

pub fn child_count(&self, node: Node) -> Result<usize, Error>[src]

pub fn set_style(&mut self, node: Node, style: Style) -> Result<(), Error>[src]

pub fn style(&self, node: Node) -> Result<&Style, Error>[src]

pub fn layout(&self, node: Node) -> Result<&Layout, Error>[src]

pub fn mark_dirty(&mut self, node: Node) -> Result<(), Error>[src]

pub fn dirty(&self, node: Node) -> Result<bool, Error>[src]

pub fn compute_layout(
    &mut self,
    node: Node,
    size: Size<Number>
) -> Result<(), Error>
[src]

Trait Implementations

impl Default for Stretch[src]

impl Drop for Stretch[src]

Auto Trait Implementations

impl !RefUnwindSafe for Stretch

impl !Send for Stretch

impl !Sync for Stretch

impl Unpin for Stretch

impl !UnwindSafe for Stretch

Blanket Implementations

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

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

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

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

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

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

type Output = T

Should always be Self

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.