pub enum ErrorCode {
BadRequest,
Unauthorized,
Forbidden,
NotFound,
Timeout,
Conflict,
PreconditionFailed,
PayloadTooLarge,
MethodNotSupported,
ClientClosedRequest,
InternalServerError,
}
Expand description
TODO
Variants§
BadRequest
Forbidden
NotFound
Timeout
Conflict
PreconditionFailed
PayloadTooLarge
MethodNotSupported
ClientClosedRequest
InternalServerError
Implementations§
Source§impl ErrorCode
impl ErrorCode
pub fn to_status_code(&self) -> u16
pub const fn from_status_code(status_code: u16) -> Option<Self>
Trait Implementations§
Source§impl NamedType for ErrorCode
impl NamedType for ErrorCode
fn sid() -> SpectaID
Source§fn named_data_type(
type_map: &mut TypeMap,
generics: &[DataType],
) -> NamedDataType
fn named_data_type( type_map: &mut TypeMap, generics: &[DataType], ) -> NamedDataType
this is equivalent to Type::inline but returns a NamedDataType instead.
Source§fn definition_named_data_type(type_map: &mut TypeMap) -> NamedDataType
fn definition_named_data_type(type_map: &mut TypeMap) -> NamedDataType
this is equivalent to [Type::definition] but returns a NamedDataType instead.
Source§impl Type for ErrorCode
impl Type for ErrorCode
Source§fn inline(type_map: &mut TypeMap, generics: Generics<'_>) -> DataType
fn inline(type_map: &mut TypeMap, generics: Generics<'_>) -> DataType
Returns the definition of a type using the provided generics. Read more
Source§fn reference(type_map: &mut TypeMap, generics: &[DataType]) -> Reference
fn reference(type_map: &mut TypeMap, generics: &[DataType]) -> Reference
Generates a datatype corresponding to a reference to this type,
as determined by its category. Getting a reference to a type implies that
it should belong in the type map (since it has to be referenced from somewhere),
so the output of
definition
will be put into the type map.impl Eq for ErrorCode
impl StructuralPartialEq for ErrorCode
Auto Trait Implementations§
impl Freeze for ErrorCode
impl RefUnwindSafe for ErrorCode
impl Send for ErrorCode
impl Sync for ErrorCode
impl Unpin for ErrorCode
impl UnwindSafe for ErrorCode
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