useserde::{Deserialize, Serialize};usecrate::{Session, SessionId};/// The response sent by the server after the client sends an
/// [`InitRequest`](crate::InitRequest).
////// This is the first message sent by the
/// server to the client after a connection is established.
#[derive(Debug, Serialize, Deserialize)]pubenumInitResponse{/// The server started a new session with the given [`SessionId`]. This is
/// sent when the client requested to start a new session by sending a
/// [`InitRequest::Start`](crate::InitRequest::Start) message.
Started(SessionId),/// The server joined the client to the session specified by the
/// [`SessionId`] received in the
/// [`InitRequest::Join`](crate::InitRequest::Join) message, and sends the
/// current [`Session`] of the session.
Joined(Session),}implcrate::encode::ShouldCompress forInitResponse{#[inline(always)]fnshould_compress(&self)->bool{matches!(self,Self::Joined(_))}}