MCPcopy Create free account
hub / github.com/audulus/rui / toggle

Function toggle

src/views/toggle.rs:118–120  ·  view source on GitHub ↗

A toggle switch with default configuration.

(on: impl Binding<bool>)

Source from the content-addressed store, hash-verified

116
117/// A toggle switch with default configuration.
118pub fn toggle(on: impl Binding<bool>) -> impl View {
119 toggle_with_config(on, ToggleConfig::default())
120}
121#[cfg(test)]
122mod tests {
123

Callers 4

test_toggle_tapFunction · 0.85
test_toggleFunction · 0.85
toggle_exampleFunction · 0.85
mainFunction · 0.85

Calls 1

toggle_with_configFunction · 0.85

Tested by 2

test_toggle_tapFunction · 0.68
test_toggleFunction · 0.68