pub struct Stretch { /* private fields */ }Implementations§
Source§impl Stretch
impl Stretch
pub fn new() -> Self
pub fn new_leaf( &mut self, style: Style, measure: Box<dyn Fn(Size<Number>) -> Result<Size<f32>, Box<dyn Any>> + Send + Sync + 'static>, ) -> Node
pub fn new_node( &mut self, style: Style, children: Vec<Node>, ) -> Result<Node, Error>
pub fn set_measure( &mut self, node: Node, measure: Option<Box<dyn Fn(Size<Number>) -> Result<Size<f32>, Box<dyn Any>> + Send + Sync + 'static>>, ) -> Result<(), Error>
pub fn add_child(&mut self, node: Node, child: Node) -> Result<(), Error>
pub fn set_children( &mut self, node: Node, children: Vec<Node>, ) -> Result<(), Error>
pub fn remove_child(&mut self, node: Node, child: Node) -> Result<Node, Error>
pub fn remove_child_at_index( &mut self, node: Node, index: usize, ) -> Result<Node, Error>
pub fn replace_child_at_index( &mut self, node: Node, index: usize, child: Node, ) -> Result<Node, Error>
pub fn children(&self, node: Node) -> Result<Vec<Node>, Error>
pub fn child_count(&self, node: Node) -> Result<usize, Error>
pub fn set_style(&mut self, node: Node, style: Style) -> Result<(), Error>
pub fn style(&self, node: Node) -> Result<&Style, Error>
pub fn layout(&self, node: Node) -> Result<&Layout, Error>
pub fn mark_dirty(&mut self, node: Node) -> Result<(), Error>
pub fn dirty(&self, node: Node) -> Result<bool, Error>
pub fn compute_layout( &mut self, node: Node, size: Size<Number>, ) -> Result<(), Error>
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Stretch
impl !UnwindSafe for Stretch
impl Freeze for Stretch
impl Send for Stretch
impl Sync for Stretch
impl Unpin for Stretch
impl UnsafeUnpin for Stretch
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more