net-core-api 0.5.3

This crate defines core traits and types for the api defined through the net-stalker project. Amazon Ion is used as the serialization format.
Documentation
use crate::core::api::API;
use crate::core::decoder_api::Decoder;
use crate::core::encoder_api::Encoder;
use crate::core::typed_api::Typed;

const DATA_TYPE: &str = "none";

#[derive(Default, Debug, PartialEq, Eq, Clone)]
pub struct None {}

impl API for None {}

impl Typed for None {
    fn get_type(&self) -> &str {
        DATA_TYPE
    }

    fn get_data_type() -> &'static str where Self : Sized {
        DATA_TYPE
    }
}

impl Encoder for None {
    fn encode(&self) -> Vec<u8> {
        vec![]
    }
}

impl Decoder for None {
    fn decode(_data: &[u8]) -> Self {
        Self::default()
    }
}