Trait RelationSetExt

Source
pub trait RelationSetExt: 'static {
    // Required methods
    fn add<P: IsA<Relation>>(&self, relation: &P);
    fn add_relation_by_type<P: IsA<Object>>(
        &self,
        relationship: RelationType,
        target: &P,
    );
    fn contains(&self, relationship: RelationType) -> bool;
    fn contains_target<P: IsA<Object>>(
        &self,
        relationship: RelationType,
        target: &P,
    ) -> bool;
    fn get_n_relations(&self) -> i32;
    fn get_relation(&self, i: i32) -> Option<Relation>;
    fn get_relation_by_type(
        &self,
        relationship: RelationType,
    ) -> Option<Relation>;
    fn remove<P: IsA<Relation>>(&self, relation: &P);
}

Required Methods§

Source

fn add<P: IsA<Relation>>(&self, relation: &P)

Source

fn add_relation_by_type<P: IsA<Object>>( &self, relationship: RelationType, target: &P, )

Source

fn contains(&self, relationship: RelationType) -> bool

Source

fn contains_target<P: IsA<Object>>( &self, relationship: RelationType, target: &P, ) -> bool

Source

fn get_n_relations(&self) -> i32

Source

fn get_relation(&self, i: i32) -> Option<Relation>

Source

fn get_relation_by_type(&self, relationship: RelationType) -> Option<Relation>

Source

fn remove<P: IsA<Relation>>(&self, relation: &P)

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§