basic streaming server implemented
+use crate::constants::STREAMING_SERVER_URL;
use crate::state_types::models::common::ModelError;
+use crate::state_types::models::ctx::user_data::UserDataLoadable;
use crate::state_types::msg::{Action, ActionSettings, Event, Internal, Msg};
use crate::state_types::{Effects, EnvError, Environment, Request, UpdateWithCtx};
use derivative::Derivative;
@@ -15,15 +17,15 @@ pub struct Settings {}
#[derive(Debug, Clone, PartialEq, Serialize)]
#[serde(tag = "type")]
pub enum StreamingServerLoadable {
- Loading {
+ Offline {
#[serde(with = "url_serde")]
url: Url,
},
- Error {
+ Loading {
#[serde(with = "url_serde")]
url: Url,
},
- Ready {
+ Online {
settings: Settings,
#[serde(with = "url_serde")]
base_url: Url,
@@ -31,3 +33,13 @@ pub enum StreamingServerLoadable {
url: Url,
},
}
+
+impl StreamingServerLoadable {
+ pub fn update<Env: Environment + 'static>(
+ &mut self,
+ user_data: &UserDataLoadable,
+ msg: &Msg,
+ ) -> Effects {
+ Effects::none().unchanged()
+ }
+}
