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

Method new

src/components/text.rs:14–20  ·  view source on GitHub ↗
(content: S)

Source from the content-addressed store, hash-verified

12
13impl Text {
14 pub fn new<S: Into<String>>(content: S) -> Self {
15 Self {
16 content: content.into(),
17 style: Style::default(),
18 bounds: Rect::default(),
19 }
20 }
21
22 pub fn with_style(mut self, style: Style) -> Self {
23 self.style = style;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected