Struct fastly_shared::FastlyStatus
source · [−]#[repr(transparent)]pub struct FastlyStatus {
pub code: i32,
}
Fields
code: i32
Implementations
sourceimpl FastlyStatus
impl FastlyStatus
sourcepub const OK: Self = Self { code: 0 }
pub const OK: Self = Self { code: 0 }
Success value.
This indicates that a hostcall finished successfully.
sourcepub const ERROR: Self = Self { code: 1 }
pub const ERROR: Self = Self { code: 1 }
Generic error value.
This means that some unexpected error occured during a hostcall.
sourcepub const BADF: Self = Self { code: 3 }
pub const BADF: Self = Self { code: 3 }
Invalid handle.
Thrown when a request, response, or body handle is not valid.
sourcepub const BUFLEN: Self = Self { code: 4 }
pub const BUFLEN: Self = Self { code: 4 }
Buffer length error.
Thrown when a buffer is too long.
sourcepub const UNSUPPORTED: Self = Self { code: 5 }
pub const UNSUPPORTED: Self = Self { code: 5 }
Unsupported operation error.
This error is thrown when some operation cannot be performed, because it is not supported.
sourcepub const BADALIGN: Self = Self { code: 6 }
pub const BADALIGN: Self = Self { code: 6 }
Alignment error.
This is thrown when a pointer does not point to a properly aligned slice of memory.
sourcepub const HTTPPARSE: Self = Self { code: 7 }
👎 Deprecated since 0.6.1: Please use the equivalent HTTPINVALID
constant instead
pub const HTTPPARSE: Self = Self { code: 7 }
Please use the equivalent HTTPINVALID
constant instead
HTTP parse error.
This can be thrown when a method, URI, or header is not valid.
sourcepub const HTTPINVALID: Self = Self { code: 7 }
pub const HTTPINVALID: Self = Self { code: 7 }
Invalid HTTP error.
This can be thrown when a method, URI, or header is not valid.
sourcepub const HTTPUSER: Self = Self { code: 8 }
pub const HTTPUSER: Self = Self { code: 8 }
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.
sourcepub const HTTPINCOMPLETE: Self = Self { code: 9 }
pub const HTTPINCOMPLETE: Self = Self { code: 9 }
HTTP incomplete message error.
This can be thrown when a stream ended unexpectedly.
sourcepub const NONE: Self = Self { code: 10 }
pub const NONE: Self = Self { code: 10 }
A None
error.
This status code is used to indicate when an optional value did not exist, as opposed to an empty value.
sourcepub const HTTPHEADTOOLARGE: Self = Self { code: 11 }
pub const HTTPHEADTOOLARGE: Self = Self { code: 11 }
HTTP head too large error.
This error will be thrown when the message head is too large.
sourcepub const HTTPINVALIDSTATUS: Self = Self { code: 12 }
pub const HTTPINVALIDSTATUS: Self = Self { code: 12 }
HTTP invalid status error.
This error will be thrown when the HTTP message contains an invalid status code.
pub fn is_ok(&self) -> bool
pub fn is_err(&self) -> bool
Trait Implementations
sourceimpl Clone for FastlyStatus
impl Clone for FastlyStatus
sourcefn clone(&self) -> FastlyStatus
fn clone(&self) -> FastlyStatus
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for FastlyStatus
impl Debug for FastlyStatus
sourceimpl PartialEq<FastlyStatus> for FastlyStatus
impl PartialEq<FastlyStatus> for FastlyStatus
sourcefn eq(&self, other: &FastlyStatus) -> bool
fn eq(&self, other: &FastlyStatus) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &FastlyStatus) -> bool
fn ne(&self, other: &FastlyStatus) -> bool
This method tests for !=
.
impl Copy for FastlyStatus
impl Eq for FastlyStatus
impl StructuralEq for FastlyStatus
impl StructuralPartialEq for FastlyStatus
Auto Trait Implementations
impl RefUnwindSafe for FastlyStatus
impl Send for FastlyStatus
impl Sync for FastlyStatus
impl Unpin for FastlyStatus
impl UnwindSafe for FastlyStatus
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more