pub struct Stretch { /* private fields */ }Implementations
sourceimpl Stretch
impl Stretch
pub fn new() -> Self
pub fn with_capacity(capacity: usize) -> Self
pub fn new_leaf(
&mut self,
style: Style,
measure: MeasureFunc
) -> Result<Node, Error>
pub fn new_node(
&mut self,
style: Style,
children: &[Node]
) -> Result<Node, Error>
pub fn set_measure(
&mut self,
node: Node,
measure: Option<MeasureFunc>
) -> Result<(), Error>
pub fn add_child(&mut self, node: Node, child: Node) -> Result<(), Error>
pub fn set_children(
&mut self,
node: Node,
children: &[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_at_index(&self, node: Node, index: usize) -> Result<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 !Send for Stretch
impl !Sync for Stretch
impl Unpin for Stretch
impl !UnwindSafe for Stretch
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more