Loading...
Loading...
#[ossido::server_ws_event("name")] - a JSON event the **server sends** to the client. Applies #[ossido::Type] (serde + TypeScript) and marks the struct as a ServerWsEvent.
A JSON event the server sends to the client. Applies everything `#[Type]` does (serde + generated TypeScript) and marks the struct as a `ServerWsEvent`, so the type system only lets you send these to a client. A bare identifier also works as the name: `#[server_ws_event(user_joined)]`.