Trait postcard_rpc::Topic

source ·
pub trait Topic {
    type Message: Schema;

    const PATH: &'static str;
    const TOPIC_KEY: Key;
}
Expand description

A marker trait denoting a single topic

Unlike Endpoints, Topics are unidirectional, and can be sent at any time asynchronously. Messages may be sent client to server, or server to client.

Typically used with the topic macro.

Required Associated Types§

source

type Message: Schema

The type of the Message (unidirectional)

Required Associated Constants§

source

const PATH: &'static str

The path associated with this Topic

source

const TOPIC_KEY: Key

The unique Key identifying the Message

Object Safety§

This trait is not object safe.

Implementors§