Skip to main content

impl_client

Macro impl_client 

Source
macro_rules! impl_client {
    ($vis:vis $name:ident, $(($variant:ident, $ty:ty)),+) => { ... };
}
Expand description

Implement an enum over a list of TURN client implementations.

All discriminants must implement TurnClientApi.

ยงExample

turn_client_proto::impl_client!(pub TurnClient, (Udp, TurnClientUdp), (Tcp, TurnClientTcp));

Roughly translates to:

pub enum TurnClient {
   Udp(TurnClientUdp),
   Tcp(TurnClientTcp),
}

// impl TurnClientApi for TurnClient {
//    ...
// }