Enum StatusCode

Source
pub enum StatusCode {
    Ok,
    Created,
    NoContent,
    NotModified,
    BadRequest,
    Unauthorized,
    Forbidden,
    NotFound,
    MethodNotAllowed,
    TooManyRequests,
    InternalServerError,
    Unknown(u16),
}
Expand description

HTTP Status Codes defined by the Mailjet API.

Statuses documented in the official documentation are enumerated in the StatusCode enum. The documentation provided for each StatusCode is taken from the documentation as is:

§Reference

https://dev.mailjet.com/email/reference/overview/errors/

Variants§

§

Ok

All went well. Congrats!

§

Created

The POST request was successfully executed.

§

NoContent

No content found or expected to return. Returned when a DELETE request was successful.

§

NotModified

The PUT request didn’t affect any record.

§

BadRequest

One or more parameters are missing or maybe misspelled (unknown resource or action).

§

Unauthorized

You have specified an incorrect API Key / API Secret Key pair. You may be unauthorized to access the API or your API key may be inactive. Visit API keys Management section to check your keys.

§

Forbidden

You are not authorized to access this resource.

§

NotFound

The resource with the specified ID you are trying to reach does not exist.

§

MethodNotAllowed

The method requested on the resource does not exist.

§

TooManyRequests

Oops! You have reached the maximum number of calls allowed per minute by our API. Please review your integration to reduce the number of calls issued by your system.

§

InternalServerError

Ouch! Something went wrong on our side and we apologize! When such error occurs, it will contain an error identifier in its description (e.g. “ErrorIdentifier” : “D4DF574C-0C5F-45C7-BA52-7AA8E533C3DE”), which is crucial for us to track the problem and identify the root cause. Please contact our support team, providing the error identifier and we will do our best to help.

§

Unknown(u16)

An unkown status code is received from the Mailjet API

Trait Implementations§

Source§

impl Debug for StatusCode

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl From<StatusCode> for StatusCode

Source§

fn from(hyper_status_code: HyperStatusCode) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more