Skip to main content

RelationExt

Trait RelationExt 

Source
pub trait RelationExt:
    IsA<Relation>
    + Sealed
    + 'static {
    // Provided methods
    fn add_target(&self, target: &impl IsA<Object>) { ... }
    fn relation_type(&self) -> RelationType { ... }
    fn target(&self) -> Vec<Object> { ... }
    fn remove_target(&self, target: &impl IsA<Object>) -> bool { ... }
    fn set_relation_type(&self, relation_type: RelationType) { ... }
    fn set_target(&self, target: Option<&ValueArray>) { ... }
    fn connect_relation_type_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F,
    ) -> SignalHandlerId { ... }
    fn connect_target_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F,
    ) -> SignalHandlerId { ... }
}
Expand description

Trait containing all Relation methods.

§Implementors

Relation

Provided Methods§

Source

fn add_target(&self, target: &impl IsA<Object>)

Adds the specified AtkObject to the target for the relation, if it is not already present. See also AtkObjectExt::add_relationship().

§target

an Object

Source

fn relation_type(&self) -> RelationType

Gets the type of self

§Returns

the type of self

Source

fn target(&self) -> Vec<Object>

Gets the target list of self

§Returns

the target list of self

Source

fn remove_target(&self, target: &impl IsA<Object>) -> bool

Remove the specified AtkObject from the target for the relation.

§target

an Object

§Returns

TRUE if the removal is successful.

Source

fn set_relation_type(&self, relation_type: RelationType)

Source

fn set_target(&self, target: Option<&ValueArray>)

Source

fn connect_relation_type_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

Source

fn connect_target_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§