streaming_server entry added to Ctx
use super::library::LibraryLoadable;
+use super::streaming_server::StreamingServerLoadable;
use super::user_data::UserDataLoadable;
use crate::state_types::msg::Msg;
use crate::state_types::{Effects, Environment, Update};
@@ -10,6 +11,7 @@ use std::marker::PhantomData;
#[derivative(Default, Debug)]
pub struct Ctx<Env: Environment> {
pub user_data: UserDataLoadable,
+ pub streaming_server: StreamingServerLoadable,
#[serde(skip)]
pub library: LibraryLoadable,
#[derivative(Debug = "ignore")]
@@ -20,7 +22,10 @@ pub struct Ctx<Env: Environment> {
impl<Env: Environment + 'static> Update for Ctx<Env> {
fn update(&mut self, msg: &Msg) -> Effects {
let user_data_effects = self.user_data.update::<Env>(&mut self.library, msg);
+ let streaming_server_effects = self.streaming_server.update::<Env>(&self.user_data, msg);
let library_effects = self.library.update::<Env>(&self.user_data, msg);
- user_data_effects.join(library_effects)
+ user_data_effects
+ .join(streaming_server_effects)
+ .join(library_effects)
}
}
