Skip to main content

impl_marker_component

Macro impl_marker_component 

Source
macro_rules! impl_marker_component {
    ($struct_name:ident, $symbol:expr, $storage:ident) => { ... };
}
Expand description

Implement ComponentTrait for a marker (unit) struct.

Marker components have no data and serialize to a single byte [1].

ยงExample

use cougr_core::impl_marker_component;

pub struct SnakeHead;

impl_marker_component!(SnakeHead, "snkhead", Sparse);