Enum sp_core::offchain::HttpRequestStatus
source · [−]pub enum HttpRequestStatus {
DeadlineReached,
IoError,
Invalid,
Finished(u16),
}
Expand description
Status of the HTTP request
Variants
DeadlineReached
Deadline was reached while we waited for this request to finish.
Note the deadline is controlled by the calling part, it not necessarily means that the request has timed out.
IoError
An error has occurred during the request, for example a timeout or the remote has closed our socket.
The request is now considered destroyed. To retry the request you need to construct it again.
Invalid
The passed ID is invalid in this context.
Finished(u16)
The request has finished with given status code.
Trait Implementations
Performs the conversion.
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
type PassBy = Codec<HttpRequestStatus>
type PassBy = Codec<HttpRequestStatus>
The strategy that should be used to pass the type.
Auto Trait Implementations
impl RefUnwindSafe for HttpRequestStatus
impl Send for HttpRequestStatus
impl Sync for HttpRequestStatus
impl Unpin for HttpRequestStatus
impl UnwindSafe for HttpRequestStatus
Blanket Implementations
Mutably borrows from an owned value. Read more
Convert Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
. Read more
Convert Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
. Read more
Convert &Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s. Read more
Convert &mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s. Read more
type SelfInstance = T
type SelfInstance = T
As Self
can be an unsized type, it needs to be represented by a sized type at the host.
This SelfInstance
is the sized type. Read more
pub fn from_ffi_value(
context: &mut dyn FunctionContext,
arg: <<T as PassBy>::PassBy as RIType>::FFIType
) -> Result<T, String>
pub fn from_ffi_value(
context: &mut dyn FunctionContext,
arg: <<T as PassBy>::PassBy as RIType>::FFIType
) -> Result<T, String>
Create SelfInstance
from the given
pub fn into_ffi_value(
self,
context: &mut dyn FunctionContext
) -> Result<<<T as PassBy>::PassBy as RIType>::FFIType, String>
pub fn into_ffi_value(
self,
context: &mut dyn FunctionContext
) -> Result<<<T as PassBy>::PassBy as RIType>::FFIType, String>
Convert self
into a ffi value.
The counterpart to unchecked_from
.
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more