Return a list of mount points as a JSON string
(&self)
| 88 | |
| 89 | /// Return a list of mount points as a JSON string |
| 90 | pub fn to_json(&self) -> String { |
| 91 | let mounts = self.0.read(); |
| 92 | |
| 93 | let mut s = String::new(); |
| 94 | s.push('['); |
| 95 | for mount_path in mounts.iter() { |
| 96 | s.push('"'); |
| 97 | s.push_str(&mount_path.0); |
| 98 | s.push('"'); |
| 99 | s.push(','); |
| 100 | } |
| 101 | s.push(']'); |
| 102 | s |
| 103 | } |
| 104 | |
| 105 | /// Make a copy of the internal state |
| 106 | pub fn copy(&self) -> Self { |
no test coverage detected