peace_resources 0.0.13

Runtime resources for the peace automation framework.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use std::marker::PhantomData;

use crate::states::{ts::Previous, States, StatesCurrent};

/// Previous `State`s for all `Item`s.
///
/// This is present when an `ApplyCmd` (`EnsureCmd` or `CleanCmd`) is run,
/// whereby the current states have changed to the newly ensured states.
pub type StatesPrevious = States<Previous>;

impl From<StatesCurrent> for StatesPrevious {
    fn from(states_current: StatesCurrent) -> Self {
        Self(states_current.into_inner(), PhantomData)
    }
}