Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions rusty/src/server/session.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ pub struct AppSession {
/// Tracks active connections and creates isolated sessions on demand.
pub struct AppSessionStore {
sessions: RwLock<HashMap<String, ()>>,
root_factory: Arc<dyn Fn() -> Box<dyn View> + Send + Sync>,
root_factory: Arc<dyn Fn() -> Box<dyn View + Send + Sync> + Send + Sync>,
}

impl AppSessionStore {
pub fn new(root_factory: Arc<dyn Fn() -> Box<dyn View> + Send + Sync>) -> Self {
pub fn new(root_factory: Arc<dyn Fn() -> Box<dyn View + Send + Sync> + Send + Sync>) -> Self {
AppSessionStore {
sessions: RwLock::new(HashMap::new()),
root_factory,
Expand Down
5 changes: 3 additions & 2 deletions rusty/src/server/ws.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ pub struct AppState {
/// The Rusty WebSocket server for frontend communication.
pub struct RustyServer {
port: u16,
root_view: Box<dyn Fn() -> Box<dyn View> + Send + Sync>,
root_view: Box<dyn Fn() -> Box<dyn View + Send + Sync> + Send + Sync>,
static_dir: Option<PathBuf>,
}

Expand All @@ -82,7 +82,8 @@ impl RustyServer {

/// Build the axum router with WebSocket support.
pub fn router(self) -> Router {
let root_factory: Arc<dyn Fn() -> Box<dyn View> + Send + Sync> = Arc::from(self.root_view);
let root_factory: Arc<dyn Fn() -> Box<dyn View + Send + Sync> + Send + Sync> =
Arc::from(self.root_view);
let session_store = AppSessionStore::new(root_factory);
let state = Arc::new(AppState { session_store });

Expand Down
Loading