Skip to main content

RelationTypeEqual

Trait RelationTypeEqual 

Source
pub trait RelationTypeEqual<E: Event> {
    // Required method
    fn relation_type_equal(&self, event: &E) -> bool;
}
Expand description

Compares an event’s relation type with a requested relation type.

Implementations inspect the m.relates_to.rel_type field in event content. Missing or malformed relation content does not match.

Required Methods§

Source

fn relation_type_equal(&self, event: &E) -> bool

Returns whether the event declares this relation type.

The comparison deserializes only the relation fields needed for the check. Content that cannot be deserialized returns false.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementations on Foreign Types§

Source§

impl<E: Event> RelationTypeEqual<E> for RelationType

Source§

fn relation_type_equal(&self, event: &E) -> bool

Implementors§