INNER CODE UNIT · Rust
add_capability
jub0t/Concat · src/crates/concat-api/src/lib.rs:200
pub fn add_capability(&mut self, name: &str) {
if !self.capabilities.iter().any(|known| known == name) {
self.capabilities.push(name.to_owned());
}
}
/// The export slot, for an embedder that shares it with a window.
pub fn exporter(&self) -> Exporter {
self.exporter.clone()
}
/// Takes an embedder's export slot in place of its own, so "one export
/// at a time" holds across a window and this API together.
pub fn share_exporter(&mut self, exporter: Exporter) {
self.exporter = exporter;
}
/// Takes an embedder's register of open projects in place of its own,