[][src]Struct fastly_shared::FastlyStatus

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

Fields

code: i32

Implementations

impl FastlyStatus[src]

pub const OK: Self[src]

Success value.

This indicates that a hostcall finished successfully.

pub const ERROR: Self[src]

Generic error value.

This means that some unexpected error occured during a hostcall.

pub const INVAL: Self[src]

Invalid argument.

pub const BADF: Self[src]

Invalid handle.

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

pub const BUFLEN: Self[src]

Buffer length error.

Thrown when a buffer is too long.

pub const UNSUPPORTED: Self[src]

Unsupported operation error.

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

pub const BADALIGN: Self[src]

Alignment error.

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

pub const HTTPPARSE: Self[src]

HTTP parse error.

This can be thrown when a method, URI, header, or status is not valid. This can also be thrown if a message head is too large.

pub const HTTPUSER: Self[src]

HTTP user error.

This is thrown 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.

pub const HTTPINCOMPLETE: Self[src]

HTTP incomplete message error.

This can be thrown when a stream ended unexpectedly.

pub const NONE: Self[src]

A None error.

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

pub fn is_ok(&self) -> bool[src]

pub fn is_err(&self) -> bool[src]

pub fn result(self) -> Result<(), Self>[src]

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

impl Clone for FastlyStatus[src]

impl Copy for FastlyStatus[src]

impl Debug for FastlyStatus[src]

impl Eq for FastlyStatus[src]

impl PartialEq<FastlyStatus> for FastlyStatus[src]

impl StructuralEq for FastlyStatus[src]

impl StructuralPartialEq for FastlyStatus[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.