pub struct DaemonServices<'w> {
pub policy: Option<Res<'w, PolicyGate>>,
pub script_rules: Option<Res<'w, GateScriptRules>>,
pub hub: Option<Res<'w, InteractionHub>>,
pub gate_stage: Option<Res<'w, GatePromptStage>>,
pub persist: Option<Res<'w, PersistenceStage>>,
pub sink: Option<Res<'w, WorldEventSink>>,
}Expand description
The resources the daemon installs, which a bare world does not have.
Every field is optional because lev run drives these same systems with no
daemon behind them: no gate lane to prompt through, no persistence lane, no
event sink. Bundled as one SystemParam so a system’s signature stays about
what it queries rather than listing the six things that might be wired.
Fields§
§policy: Option<Res<'w, PolicyGate>>The taint-gate policy, when one is configured.
script_rules: Option<Res<'w, GateScriptRules>>Rhai rules the gate consults before blocking.
hub: Option<Res<'w, InteractionHub>>The hub a blocked call can prompt through.
gate_stage: Option<Res<'w, GatePromptStage>>The lane a gate prompt’s answer comes back on.
persist: Option<Res<'w, PersistenceStage>>The lane run state is written on.
sink: Option<Res<'w, WorldEventSink>>Where world events are broadcast.
Trait Implementations§
impl<'w, 's> ReadOnlySystemParam for DaemonServices<'w>where
Option<Res<'w, PolicyGate>>: ReadOnlySystemParam,
Option<Res<'w, GateScriptRules>>: ReadOnlySystemParam,
Option<Res<'w, InteractionHub>>: ReadOnlySystemParam,
Option<Res<'w, GatePromptStage>>: ReadOnlySystemParam,
Option<Res<'w, PersistenceStage>>: ReadOnlySystemParam,
Option<Res<'w, WorldEventSink>>: ReadOnlySystemParam,
Source§impl SystemParam for DaemonServices<'_>
impl SystemParam for DaemonServices<'_>
Source§type Item<'w, 's> = DaemonServices<'w>
type Item<'w, 's> = DaemonServices<'w>
The item type returned when constructing this system param.
The value of this associated type should be
Self, instantiated with new lifetimes. Read moreSource§fn init_access(
state: &Self::State,
system_meta: &mut SystemMeta,
component_access_set: &mut FilteredAccessSet,
world: &mut World,
)
fn init_access( state: &Self::State, system_meta: &mut SystemMeta, component_access_set: &mut FilteredAccessSet, world: &mut World, )
Source§fn apply(state: &mut Self::State, system_meta: &SystemMeta, world: &mut World)
fn apply(state: &mut Self::State, system_meta: &SystemMeta, world: &mut World)
Applies any deferred mutations stored in this
SystemParam’s state.
This is used to apply Commands during ApplyDeferred.Source§fn queue(
state: &mut Self::State,
system_meta: &SystemMeta,
world: DeferredWorld<'_>,
)
fn queue( state: &mut Self::State, system_meta: &SystemMeta, world: DeferredWorld<'_>, )
Queues any deferred mutations to be applied at the next
ApplyDeferred.Source§unsafe fn get_param<'w, 's>(
state: &'s mut Self::State,
system_meta: &SystemMeta,
world: UnsafeWorldCell<'w>,
change_tick: Tick,
) -> Result<Self::Item<'w, 's>, SystemParamValidationError>
unsafe fn get_param<'w, 's>( state: &'s mut Self::State, system_meta: &SystemMeta, world: UnsafeWorldCell<'w>, change_tick: Tick, ) -> Result<Self::Item<'w, 's>, SystemParamValidationError>
Creates a parameter to be passed into a
SystemParamFunction. Read moreAuto Trait Implementations§
impl<'w> !RefUnwindSafe for DaemonServices<'w>
impl<'w> !UnwindSafe for DaemonServices<'w>
impl<'w> Freeze for DaemonServices<'w>
impl<'w> Send for DaemonServices<'w>
impl<'w> Sync for DaemonServices<'w>
impl<'w> Unpin for DaemonServices<'w>
impl<'w> UnsafeUnpin for DaemonServices<'w>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<T> ConditionalSend for Twhere
T: Send,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Converts
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Converts
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Converts
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Converts
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoResult<T> for T
impl<T> IntoResult<T> for T
Source§fn into_result(self) -> Result<T, RunSystemError>
fn into_result(self) -> Result<T, RunSystemError>
Converts this type into the system output type.