Topic

Trait Topic 

Source
pub trait Topic:
    Default
    + Debug
    + Display
    + Clone
    + FromStr
    + ToString
    + Hash
    + PartialEq
    + Eq
    + Send
    + Sync {
    // Required method
    fn as_route(&self) -> String;
}

Required Methods§

Source

fn as_route(&self) -> String

Returns the topic part that can be used to route messages

This is used to route the messages you receive from the broker Imagine your V2X client sends CAM messages on a topic like the following /root/cam/client_1/anything You might want to route it differently following the receiving application If you want to route the message using the message type this method should return /root/cam If you want to route the messages using the client this method should return /root/cam/client_1

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§