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

Method new

src/layout/responsive.rs:16–26  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

14
15impl ResponsiveLayout {
16 pub fn new() -> Self {
17 Self {
18 breakpoints: vec![
19 (600.0, Breakpoint::Small),
20 (960.0, Breakpoint::Medium),
21 (1280.0, Breakpoint::Large),
22 (f32::MAX, Breakpoint::XLarge),
23 ],
24 current: Breakpoint::Medium,
25 }
26 }
27
28 pub fn get_layout<'a, T>(&self, layouts: &'a [(Breakpoint, T)]) -> Option<&'a T> {
29 layouts.iter()

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected