phoxal 0.6.0

Phoxal — production-oriented autonomous robot framework (engine, model, typed bus, contracts).
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use derive_new::new;
use serde::{Deserialize, Serialize};

#[derive(Clone, Debug, Serialize, Deserialize, new)]
pub struct Audio {
    #[serde(with = "serde_bytes")]
    #[new(into)]
    data: Vec<u8>,
}

impl Audio {
    pub fn data(&self) -> &[u8] {
        &self.data
    }
}

pub const KIND: &str = "speaker/audio";