MCPcopy Create free account
hub / github.com/LibertyOS-Development/kernel / update

Method update

src/vol.rs:104–113  ·  view source on GitHub ↗

Use specified closure and volatile instruction(s) to update contained value:

(&mut self, f: F)

Source from the content-addressed store, hash-verified

102
103 // Use specified closure and volatile instruction(s) to update contained value:
104 pub fn update<F>(&mut self, f: F)
105 where
106 A: CanRead + CanWrite,
107 R: DerefMut,
108 F: FnOnce(&mut T),
109 {
110 let mut value = self.read();
111 f(&mut value);
112 self.write(value);
113 }
114}
115
116

Callers

nothing calls this directly

Calls 2

readMethod · 0.45
writeMethod · 0.45

Tested by

no test coverage detected