ed_journals/modules/state/models/resolvers/
mission_state_resolver.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
use crate::logs::LogEvent;
use crate::state::models::feed_result::FeedResult;
use crate::state::traits::state_resolver::StateResolver;
use serde::Serialize;
use std::collections::HashMap;

#[derive(Serialize, Default)]
pub struct MissionStateResolver {
    pub missions: HashMap<u64, Mission>,
}

#[derive(Serialize)]
pub struct Mission {}

impl StateResolver<LogEvent> for MissionStateResolver {
    fn feed(&mut self, _input: &LogEvent) -> FeedResult {
        FeedResult::Accepted
    }
}