Skip to main content

available_game_events

Function available_game_events 

Source
pub async fn available_game_events(
    server_state: ServerState,
    user_id: UserId,
) -> Result<impl Stream<Item = AvailableGameEvent>, ServerError>
Expand description

Streams updates about games that are available to the given user.

The stream yields AvailableGameEvents when a game is created or removed from the list of games available to the user.

§Parameters

  • server_state: The shared server state, including the database change broadcaster.
  • user_id: The ID of the user for whom available games are tracked.

§Returns

A Stream of AvailableGameEvents wrapped in Result. Errors may occur due to internal server issues.