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

Method new

src/components/input.rs:13–22  ·  view source on GitHub ↗
(placeholder: S)

Source from the content-addressed store, hash-verified

11
12impl Input {
13 pub fn new<S: Into<String>>(placeholder: S) -> Self {
14 Self {
15 value: String::new(),
16 placeholder: placeholder.into(),
17 bounds: Rect {
18 origin: Point::new(0.0, 0.0),
19 size: Size { width: 200.0, height: 40.0 },
20 },
21 }
22 }
23
24 pub fn set_value(&mut self, value: String) {
25 self.value = value;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected