pub struct ResearchSystem { /* private fields */ }Expand description
System that processes research events with hooks
This system:
- Processes research queue requests
- Processes research start/cancel requests
- Processes progress updates (manual or auto)
- Calls hooks for custom behavior
- Publishes state change events for network replication
§Feedback Loop
Command Event → Validation (Hook) → State Update → Hook Call → State EventImplementations§
Source§impl ResearchSystem
impl ResearchSystem
Sourcepub fn new(hook: Arc<dyn ResearchHook>) -> Self
pub fn new(hook: Arc<dyn ResearchHook>) -> Self
Create a new ResearchSystem with a custom hook
Sourcepub async fn process_events(
&mut self,
services: &ServiceContext,
resources: &mut ResourceContext,
)
pub async fn process_events( &mut self, services: &ServiceContext, resources: &mut ResourceContext, )
Process all research events
Trait Implementations§
Source§impl Clone for ResearchSystem
impl Clone for ResearchSystem
Source§fn clone(&self) -> ResearchSystem
fn clone(&self) -> ResearchSystem
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl System for ResearchSystem
impl System for ResearchSystem
Source§fn as_any_mut(&mut self) -> &mut dyn Any
fn as_any_mut(&mut self) -> &mut dyn Any
Downcast to Any for type-safe mutable access
Auto Trait Implementations§
impl !RefUnwindSafe for ResearchSystem
impl !UnwindSafe for ResearchSystem
impl Freeze for ResearchSystem
impl Send for ResearchSystem
impl Sync for ResearchSystem
impl Unpin for ResearchSystem
impl UnsafeUnpin for ResearchSystem
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> Component for T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more