MCPcopy Create free account
hub / github.com/PerroEngine/Perro / set_open

Method set_open

perro_source/core/perro_ui/src/tree.rs:172–181  ·  view source on GitHub ↗
(&mut self, index: usize, open: bool)

Source from the content-addressed store, hash-verified

170 }
171
172 pub fn set_open(&mut self, index: usize, open: bool) -> bool {
173 let Some(item) = self.items.get_mut(index) else {
174 return false;
175 };
176 if item.open == open {
177 return false;
178 }
179 item.open = open;
180 true
181 }
182
183 pub fn toggle_open(&mut self, index: usize) -> bool {
184 let Some(item) = self.items.get_mut(index) else {

Callers

nothing calls this directly

Calls 1

get_mutMethod · 0.45

Tested by

no test coverage detected