torrust_tracker/servers/http/v1/responses/
mod.rs

1//! HTTP responses for the HTTP tracker.
2//!
3//! Refer to the generic [HTTP server documentation](crate::servers::http) for
4//! more information about the HTTP tracker.
5pub mod announce;
6pub mod error;
7pub mod scrape;
8
9pub use announce::{Announce, Compact, Normal};
10
11/// Trait that defines the Announce Response Format
12pub trait Response: axum::response::IntoResponse {
13    /// Returns the Body of the Announce Response
14    ///
15    /// # Errors
16    ///
17    /// If unable to generate the response, it will return an error.
18    fn body(self) -> Result<Vec<u8>, error::Error>;
19}