#[repr(transparent)]
pub struct FastlyStatus { pub code: i32, }

Fields§

§code: i32

Implementations§

Success value.

This indicates that a hostcall finished successfully.

Generic error value.

This means that some unexpected error occurred during a hostcall.

Invalid argument.

Invalid handle.

Returned when a request, response, or body handle is not valid.

Buffer length error.

Returned when a buffer is too long.

Unsupported operation error.

This error is returned when some operation cannot be performed, because it is not supported.

Alignment error.

This is returned when a pointer does not point to a properly aligned slice of memory.

Invalid HTTP error.

This can be returned when a method, URI, or header is not valid.

HTTP user error.

This is returned in cases where user code caused an HTTP error. For example, attempt to send a 1xx response code, or a request with a non-absolute URI. This can also be caused by an unexpected header: both content-length and transfer-encoding, for example.

HTTP incomplete message error.

This can be returned when a stream ended unexpectedly.

A None error.

This status code is used to indicate when an optional value did not exist, as opposed to an empty value.

HTTP head too large error.

This error will be returned when the message head is too large.

HTTP invalid status error.

This error will be returned when the HTTP message contains an invalid status code.

Limit exceeded

This is returned when an attempt to allocate a resource has exceeded the maximum number of resources permitted. For example, creating too many response handles.

Convert a FastlyStatus value to a Result<(), FastlyStatus>.

This will consume a status code, and return Ok(()) if and only if the value was FastlyStatus::OK. If the status code was some error, then it will be returned in the result’s Err variant.

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
This method tests for self and other values to be equal, and is used by ==.
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.