Trait OwnerReferenceExt

Source
pub trait OwnerReferenceExt {
    // Required methods
    fn is_owned_by<T>(&self, owner: &T) -> bool
       where T: Metadata<Ty = ObjectMeta>;
    fn is_controlled_by<T>(&self, owner: &T) -> bool
       where T: Metadata<Ty = ObjectMeta>;
}

Required Methods§

Source

fn is_owned_by<T>(&self, owner: &T) -> bool
where T: Metadata<Ty = ObjectMeta>,

Check for self being owned by owner

Source

fn is_controlled_by<T>(&self, owner: &T) -> bool
where T: Metadata<Ty = ObjectMeta>,

Check for self being owned and controlled by owner

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.

Implementors§

Source§

impl<K> OwnerReferenceExt for K
where K: Metadata<Ty = ObjectMeta>,