pub enum ErrorCode {
BadRequest,
Unauthorized,
PayloadTooLarge,
UnsupportedTarget,
RenderFailed,
Internal,
}Expand description
Machine-readable failure classification.
Variants§
BadRequest
The body did not parse, or a field is out of range.
No bearer token, a malformed Authorization header, or the wrong
token. Distinct from ErrorCode::BadRequest because the client’s
remedy is to fix its credentials, not its payload.
PayloadTooLarge
The request body is larger than the server accepts. Distinct from
ErrorCode::BadRequest because retrying the identical request is
hopeless — the client has to split or shrink the upload.
UnsupportedTarget
The server was built without the feature this target/format needs
(e.g. html without typst-html), or lacks the pandoc binary.
RenderFailed
The pipeline ran and failed — bad markdown, a template that does not compile, an engine error.
Internal
Anything the server cannot attribute to the request.
Trait Implementations§
impl Copy for ErrorCode
Source§impl<'de> Deserialize<'de> for ErrorCode
impl<'de> Deserialize<'de> for ErrorCode
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
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 UnsafeUnpin 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