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

Method new

src/components/view.rs:16–23  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

14
15impl View {
16 pub fn new() -> Self {
17 Self {
18 children: Vec::new(),
19 style: Style::default(),
20 layout: Layout::Column,
21 bounds: Rect::default(),
22 }
23 }
24
25 pub fn child<C: Component + 'static>(mut self, component: C) -> Self {
26 self.children.push(Box::new(component));

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected