Skip to main content

DictExt

Trait DictExt 

Source
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§

Source

fn get_capability(&self, path: &impl IterablePath) -> Option<Capability>

Returns the capability at the path, if it exists. Returns None if path is empty.

Source

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.

Source

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".

Implementations on Foreign Types§

Source§

impl DictExt for Arc<Dictionary>

Implementors§