peace_item_sh_cmd/
sh_cmd_data.rs1use std::marker::PhantomData;
2
3use peace::{
4 cfg::{accessors::Stored, State},
5 data::Data,
6};
7
8use crate::{ShCmdExecutionRecord, ShCmdStateLogical};
9
10#[derive(Data, Debug)]
17pub struct ShCmdData<'exec, Id>
18where
19 Id: Send + Sync + 'static,
20{
21 state_current_stored: Stored<'exec, State<ShCmdStateLogical<Id>, ShCmdExecutionRecord>>,
23
24 marker: PhantomData<Id>,
26}
27
28impl<Id> ShCmdData<'_, Id>
29where
30 Id: Send + Sync + 'static,
31{
32 pub fn state_current_stored(
34 &self,
35 ) -> Option<&State<ShCmdStateLogical<Id>, ShCmdExecutionRecord>> {
36 self.state_current_stored.get()
37 }
38}