ModuleDefLookup

Trait ModuleDefLookup 

Source
pub trait ModuleDefLookup:
    Sized
    + Debug
    + 'static {
    type Key<'a>: Debug + Copy;

    // Required methods
    fn key(&self) -> Self::Key<'_>;
    fn lookup<'a>(
        module_def: &'a ModuleDef,
        key: Self::Key<'_>,
    ) -> Option<&'a Self>;
}
Expand description

Implemented by definitions stored in a ModuleDef. Allows looking definitions up in a ModuleDef, and across ModuleDefs during migrations.

Required Associated Types§

Source

type Key<'a>: Debug + Copy

A reference to a definition of this type within a module def. This reference should be portable across migrations.

Required Methods§

Source

fn key(&self) -> Self::Key<'_>

Get a reference to this definition.

Source

fn lookup<'a>(module_def: &'a ModuleDef, key: Self::Key<'_>) -> Option<&'a Self>

Look up this entity in the module def.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl ModuleDefLookup for RawRowLevelSecurityDefV9

Source§

type Key<'a> = &'a Box<str>

Source§

fn key(&self) -> Self::Key<'_>

Source§

fn lookup<'a>(module_def: &'a ModuleDef, key: Self::Key<'_>) -> Option<&'a Self>

Implementors§