1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
use serde::Serialize;
use serde_json::Value;

use super::ecs_object::EcsObject;

#[derive(Serialize)]
pub struct Host {
    name: Value
}

impl EcsObject for Host {
    fn object_key(&self) -> &'static str {
        "host"
    }
}

impl From<&Value> for Host {
    fn from(val: &Value) -> Self {
        Self {
            name: val.clone()
        }
    }
}