use std::marker::PhantomData;
use peace::{
cfg::{accessors::Stored, State},
data::Data,
};
use crate::{ShCmdExecutionRecord, ShCmdStateLogical};
#[derive(Data, Debug)]
pub struct ShCmdData<'exec, Id>
where
Id: Send + Sync + 'static,
{
state_current_stored: Stored<'exec, State<ShCmdStateLogical<Id>, ShCmdExecutionRecord>>,
marker: PhantomData<Id>,
}
impl<Id> ShCmdData<'_, Id>
where
Id: Send + Sync + 'static,
{
pub fn state_current_stored(
&self,
) -> Option<&State<ShCmdStateLogical<Id>, ShCmdExecutionRecord>> {
self.state_current_stored.get()
}
}