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

Method new

src/components/stack.rs:22–33  ·  view source on GitHub ↗
(direction: Direction)

Source from the content-addressed store, hash-verified

20
21impl Stack {
22 pub fn new(direction: Direction) -> Self {
23 Self {
24 direction,
25 children: Vec::new(),
26 spacing: 8.0,
27 bounds: Rect {
28 origin: Point::new(0.0, 0.0),
29 size: Size { width: 0.0, height: 0.0 },
30 },
31 child_positions: Vec::new(),
32 }
33 }
34
35 pub fn spacing(mut self, spacing: f32) -> Self {
36 self.spacing = spacing;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected