[−][src]Struct fastly_shared::FastlyStatus
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]
pub fn clone(&self) -> FastlyStatus
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for FastlyStatus
[src]
impl Debug for FastlyStatus
[src]
impl Eq for FastlyStatus
[src]
impl PartialEq<FastlyStatus> for FastlyStatus
[src]
pub fn eq(&self, other: &FastlyStatus) -> bool
[src]
pub fn ne(&self, other: &FastlyStatus) -> bool
[src]
impl StructuralEq for FastlyStatus
[src]
impl StructuralPartialEq for FastlyStatus
[src]
Auto Trait Implementations
impl RefUnwindSafe for FastlyStatus
[src]
impl Send for FastlyStatus
[src]
impl Sync for FastlyStatus
[src]
impl Unpin for FastlyStatus
[src]
impl UnwindSafe for FastlyStatus
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,