Type Definition kompact::Never

source ·
pub type Never = !;
Expand description

A more readable placeholder for a stable Never (!) type.

It is recommended to use this in port directions and actor types, which do not expect any messages, instead of the unit type (). This way the compiler should correctly identify any handlers enforced to be implemented by the API as dead code and eliminate them, resulting in smaller code sizes.

Trait Implementations§

source§

impl Deserialiser<!> for Never

source§

const SER_ID: SerId = 0u64

The serialisation id for which this deserialiser is to be invoked
source§

fn deserialise(_buf: &mut dyn Buf) -> Result<Never, SerError>

Try to deserialise a T from the given buf Read more