pub struct StatusCode {
pub code: Code,
pub description: Option<Text<200>>,
pub additional_info: Option<Text<1000>>,
}Expand description
The status of an operation: a Code, and optional human-readable detail.
The structure consists of a defined code, an optional functional description of the status, and optional additional information. It can be used e.g. to send error details or detailed reasons for a certain process or system behavior.
Spec: StatusCode.
Fields§
§code: CodeThe machine-readable code.
description: Option<Text<200>>A functional description of the status.
additional_info: Option<Text<1000>>Further individual, non-standardised information.
Implementations§
Source§impl StatusCode
impl StatusCode
Sourcepub fn builder() -> StatusCodeBuilder
pub fn builder() -> StatusCodeBuilder
Create an instance of StatusCode using the builder syntax
Source§impl StatusCode
impl StatusCode
Trait Implementations§
Source§impl Clone for StatusCode
impl Clone for StatusCode
Source§impl Debug for StatusCode
impl Debug for StatusCode
Source§impl<'de> Deserialize<'de> for StatusCode
impl<'de> Deserialize<'de> for StatusCode
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for StatusCode
impl Display for StatusCode
impl Eq for StatusCode
Source§impl From<Code> for StatusCode
impl From<Code> for StatusCode
Source§impl JsonSchema for StatusCode
Available on crate feature schema only.
impl JsonSchema for StatusCode
Available on crate feature
schema only.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(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§impl PartialEq for StatusCode
impl PartialEq for StatusCode
Source§impl Serialize for StatusCode
impl Serialize for StatusCode
impl StructuralPartialEq for StatusCode
Source§impl Validate for StatusCode
impl Validate for StatusCode
Auto Trait Implementations§
impl Freeze for StatusCode
impl RefUnwindSafe for StatusCode
impl Send for StatusCode
impl Sync for StatusCode
impl Unpin for StatusCode
impl UnsafeUnpin for StatusCode
impl UnwindSafe for StatusCode
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.