Protocol

Trait Protocol 

Source
pub trait Protocol:
    Sealed
    + Copy
    + Send
    + Sync
    + 'static {
    const KIND: ProtocolKind;
    const DEFAULT_PORT: u16;
    const NEEDS_AUTH: bool;
}
Expand description

Sealed marker trait for D-STAR reflector protocols.

Only the three protocols defined in this module (DPlus, DExtra, Dcs) may implement this trait. The seal prevents downstream crates from adding fake protocols, which would invalidate every typestate proof.

Required Associated Constants§

Source

const KIND: ProtocolKind

Runtime discriminator for this protocol.

Source

const DEFAULT_PORT: u16

Default UDP port.

Source

const NEEDS_AUTH: bool

Whether this protocol requires TCP authentication before UDP linking.

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§

Source§

impl Protocol for DExtra

Source§

const KIND: ProtocolKind = ProtocolKind::DExtra

Source§

const DEFAULT_PORT: u16 = 30001

Source§

const NEEDS_AUTH: bool = false

Source§

impl Protocol for DPlus

Source§

const KIND: ProtocolKind = ProtocolKind::DPlus

Source§

const DEFAULT_PORT: u16 = 20001

Source§

const NEEDS_AUTH: bool = true

Source§

impl Protocol for Dcs

Source§

const KIND: ProtocolKind = ProtocolKind::Dcs

Source§

const DEFAULT_PORT: u16 = 30051

Source§

const NEEDS_AUTH: bool = false