pub struct Message {
pub code: &'static str,
pub content: String,
}
Fields§
§code: &'static str
A unique error code, useful for localization.
content: String
A human-readable error message in English.
Trait Implementations§
Source§impl JsonSchema for Message
impl JsonSchema for Message
Source§fn schema_name() -> String
fn schema_name() -> String
The name of the generated JSON Schema. Read more
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(gen: &mut SchemaGenerator) -> Schema
fn json_schema(gen: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
Whether JSON Schemas generated for this type should be re-used where possible using the
$ref
keyword. Read moreSource§impl OperationOutput for Message
impl OperationOutput for Message
Source§fn operation_response(
ctx: &mut GenContext,
operation: &mut Operation,
) -> Option<Response>
fn operation_response( ctx: &mut GenContext, operation: &mut Operation, ) -> Option<Response>
Return a response documentation for this type,
alternatively modify the operation if required. Read more
Source§fn inferred_responses(
ctx: &mut GenContext,
operation: &mut Operation,
) -> Vec<(Option<u16>, Response)>
fn inferred_responses( ctx: &mut GenContext, operation: &mut Operation, ) -> Vec<(Option<u16>, Response)>
Inferred responses are used when the type is
used as a request handler return type. Read more
impl Encode for Message
Auto Trait Implementations§
impl Freeze for Message
impl RefUnwindSafe for Message
impl Send for Message
impl Sync for Message
impl Unpin for Message
impl UnwindSafe for Message
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more