pub trait Action: Debug + Any {
// Required method
fn stateful(
&self,
io: &IoManager,
res: &ResourceManager,
config: &Config,
sync_writer: &QWriter<SyncSignal>,
async_writer: &QWriter<AsyncSignal>,
) -> Result<Box<dyn StatefulAction>>;
// Provided methods
fn init(self) -> Result<Box<dyn Action>>
where Self: 'static + Sized { ... }
fn in_signals(&self) -> BTreeSet<SignalId> { ... }
fn out_signals(&self) -> BTreeSet<SignalId> { ... }
fn resources(&self, config: &Config) -> Vec<ResourceAddr> { ... }
}Required Methods§
fn stateful( &self, io: &IoManager, res: &ResourceManager, config: &Config, sync_writer: &QWriter<SyncSignal>, async_writer: &QWriter<AsyncSignal>, ) -> Result<Box<dyn StatefulAction>>
Provided Methods§
fn init(self) -> Result<Box<dyn Action>>where
Self: 'static + Sized,
fn in_signals(&self) -> BTreeSet<SignalId>
fn out_signals(&self) -> BTreeSet<SignalId>
fn resources(&self, config: &Config) -> Vec<ResourceAddr>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Box<dyn Action>
impl<'de> Deserialize<'de> for Box<dyn Action>
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<'a> From<&'a (dyn Action + 'static)> for ActionEnumAsRef<'a>
impl<'a> From<&'a (dyn Action + 'static)> for ActionEnumAsRef<'a>
Source§fn from(f: &dyn Action) -> ActionEnumAsRef<'_>
fn from(f: &dyn Action) -> ActionEnumAsRef<'_>
Converts to this type from the input type.