textsurf 0.4.2

Webservice for efficiently serving multiple plain text documents or excerpts thereof (by unicode character offset), without everything into memory.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use utoipa::ToSchema;

#[derive(ToSchema)]
/// An API error in JSON
#[allow(dead_code)]
pub struct ApiError {
    #[schema(rename = "@type")]
    /// The type of error, this will be "ApiError"
    r#type: String,

    /// The error name (MissingArgument, InternalError, NotFound, CustomNotFound, NotAcceptable, PermissionDenied)
    name: String,

    /// The error message
    message: String,
}