gsof_protocol 0.1.23

Software to collect data generated by sources who provide GSOF messages (Trimble)
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use std::error::Error;
use async_trait::async_trait;

#[async_trait]
pub trait SerdeProtocol {
    /*
    take object and serialize to bytes
     */
    fn serialize(&self) -> Result<&[u8], Box<dyn Error>>;
    /*
    take bytes and deserialize to object
     */
    async fn deserialize(bytes:&[u8]) -> Self;    
}