pub trait DictExt {
// Required methods
fn get_capability(&self, path: &impl IterablePath) -> Option<Capability>;
fn insert_capability(
&self,
path: &impl IterablePath,
capability: Capability,
) -> Option<Capability>;
fn remove_capability(&self, path: &impl IterablePath) -> Option<Capability>;
}Required Methods§
Sourcefn get_capability(&self, path: &impl IterablePath) -> Option<Capability>
fn get_capability(&self, path: &impl IterablePath) -> Option<Capability>
Returns the capability at the path, if it exists. Returns None if path is empty.
Sourcefn insert_capability(
&self,
path: &impl IterablePath,
capability: Capability,
) -> Option<Capability>
fn insert_capability( &self, path: &impl IterablePath, capability: Capability, ) -> Option<Capability>
Inserts the capability at the path. Intermediary dictionaries are created as needed. If there’s already a capability at the path, then the preexisting value is returned.
Sourcefn remove_capability(&self, path: &impl IterablePath) -> Option<Capability>
fn remove_capability(&self, path: &impl IterablePath) -> Option<Capability>
Removes the capability at the path, if it exists, and returns it.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".