Skip to main content

TopicGrammar

Trait TopicGrammar 

Source
pub trait TopicGrammar: Send + Sync {
    // Required method
    fn compile(
        &self,
        pattern: &TopicPattern<'_>,
    ) -> Result<Box<dyn TopicFilter>, String>;

    // Provided method
    fn covers(&self, a: &str, b: &str) -> bool { ... }
}
Expand description

A connector’s wildcard rules.

Required Methods§

Source

fn compile( &self, pattern: &TopicPattern<'_>, ) -> Result<Box<dyn TopicFilter>, String>

Provided Methods§

Source

fn covers(&self, a: &str, b: &str) -> bool

Whether a matches every topic b matches. May be conservative.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§