scuffle_rtmp/session/server/
error.rs

1//! Error type for server sessions.
2
3/// Errors that can occur during a server session.
4#[derive(Debug, thiserror::Error)]
5pub enum ServerSessionError {
6    /// Timeout.
7    #[error("timeout: {0}")]
8    Timeout(#[from] tokio::time::error::Elapsed),
9    /// Received publish command before connect command.
10    #[error("received publish command before connect command")]
11    PublishBeforeConnect,
12    /// Play not supported.
13    #[error("play not supported")]
14    PlayNotSupported,
15    /// Invalid chunk size.
16    #[error("invalid chunk size: {0}")]
17    InvalidChunkSize(usize),
18}