pub struct Runtime {
pub services: Services,
pub backends: Backends,
pub resources: Resources,
}Expand description
Bundle of the three runtime containers.
Engine init builds one Runtime (mutating its containers freely),
then wraps it in an Arc<Runtime> and stores it in
EngineContext. After that point the bundle
is immutable for the rest of the engine lifetime.
Lanes, agents, flows, and data systems receive &Runtime and look up
what they need with runtime.services.get::<X>(),
runtime.backends.get::<X>(), or runtime.resources.get::<X>().
Fields§
§services: ServicesStateful business-logic objects (AssetService, …).
backends: BackendsConcrete trait implementations (RenderSystem, …).
resources: ResourcesLong-lived shared state (InputMap, …).
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Runtime
impl !RefUnwindSafe for Runtime
impl Send for Runtime
impl Sync for Runtime
impl Unpin for Runtime
impl UnsafeUnpin for Runtime
impl !UnwindSafe for Runtime
Blanket Implementations§
Source§impl<T> AppLifecycle for Twhere
T: ?Sized,
impl<T> AppLifecycle for Twhere
T: ?Sized,
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