MCPcopy Create free account
hub / github.com/algoscienceacademy/RustUI / child

Method child

src/components/stack.rs:41–45  ·  view source on GitHub ↗
(mut self, child: C)

Source from the content-addressed store, hash-verified

39 }
40
41 pub fn child<C: Component + 'static>(mut self, child: C) -> Self {
42 self.children.push(Box::new(child));
43 self.recalculate_layout();
44 self
45 }
46
47 fn recalculate_layout(&mut self) {
48 let mut width: f32 = 0.0;

Callers

nothing calls this directly

Calls 2

pushMethod · 0.80
recalculate_layoutMethod · 0.80

Tested by

no test coverage detected