pub enum AsyncItem {
Body(Body),
StreamingBody(StreamingBody),
PendingReq(PeekableTask<Response<Body>>),
PendingDownstream(PendingDownstreamReqTask),
PendingKvLookup(PendingKvLookupTask),
PendingKvInsert(PendingKvInsertTask),
PendingKvDelete(PendingKvDeleteTask),
PendingKvList(PendingKvListTask),
PendingCache(PendingCacheTask),
Ready,
}Expand description
Represents either a full body, or the write end of a streaming body.
This enum is needed because we reuse the handle for a body when it is transformed into a streaming
body (writeable only). It is used within the body handle map in Session.
Variants§
Body(Body)
StreamingBody(StreamingBody)
PendingReq(PeekableTask<Response<Body>>)
PendingDownstream(PendingDownstreamReqTask)
PendingKvLookup(PendingKvLookupTask)
PendingKvInsert(PendingKvInsertTask)
PendingKvDelete(PendingKvDeleteTask)
PendingKvList(PendingKvListTask)
PendingCache(PendingCacheTask)
Ready
Implementations§
Source§impl AsyncItem
impl AsyncItem
pub fn is_streaming(&self) -> bool
pub fn as_body(&self) -> Option<&Body>
pub fn as_body_mut(&mut self) -> Option<&mut Body>
pub fn into_body(self) -> Option<Body>
pub fn as_streaming_mut(&mut self) -> Option<&mut StreamingBody>
pub fn into_streaming(self) -> Option<StreamingBody>
pub fn begin_streaming(&mut self) -> Option<Body>
pub fn as_pending_kv_lookup(&self) -> Option<&PendingKvLookupTask>
pub fn into_pending_kv_lookup(self) -> Option<PendingKvLookupTask>
pub fn as_pending_kv_insert(&self) -> Option<&PendingKvInsertTask>
pub fn into_pending_kv_insert(self) -> Option<PendingKvInsertTask>
pub fn as_pending_kv_delete(&self) -> Option<&PendingKvDeleteTask>
pub fn into_pending_kv_delete(self) -> Option<PendingKvDeleteTask>
pub fn as_pending_kv_list(&self) -> Option<&PendingKvListTask>
pub fn into_pending_kv_list(self) -> Option<PendingKvListTask>
pub fn as_pending_req(&self) -> Option<&PeekableTask<Response<Body>>>
pub fn as_pending_req_mut( &mut self, ) -> Option<&mut PeekableTask<Response<Body>>>
pub fn as_pending_cache(&self) -> Option<&PendingCacheTask>
pub fn as_pending_cache_mut(&mut self) -> Option<&mut PendingCacheTask>
pub fn into_pending_cache(self) -> Option<PendingCacheTask>
pub fn into_pending_req(self) -> Option<PeekableTask<Response<Body>>>
pub fn as_pending_downstream_req_mut( &mut self, ) -> Option<&mut PendingDownstreamReqTask>
pub fn into_pending_downstream_req(self) -> Option<PendingDownstreamReqTask>
pub async fn await_ready(&mut self)
pub fn is_ready(&mut self) -> bool
Trait Implementations§
Source§impl From<PendingCacheTask> for AsyncItem
impl From<PendingCacheTask> for AsyncItem
Source§fn from(task: PendingCacheTask) -> Self
fn from(task: PendingCacheTask) -> Self
Converts to this type from the input type.
Source§impl From<PendingDownstreamReqTask> for AsyncItem
impl From<PendingDownstreamReqTask> for AsyncItem
Source§fn from(task: PendingDownstreamReqTask) -> Self
fn from(task: PendingDownstreamReqTask) -> Self
Converts to this type from the input type.
Source§impl From<PendingKvDeleteTask> for AsyncItem
impl From<PendingKvDeleteTask> for AsyncItem
Source§fn from(task: PendingKvDeleteTask) -> Self
fn from(task: PendingKvDeleteTask) -> Self
Converts to this type from the input type.
Source§impl From<PendingKvInsertTask> for AsyncItem
impl From<PendingKvInsertTask> for AsyncItem
Source§fn from(task: PendingKvInsertTask) -> Self
fn from(task: PendingKvInsertTask) -> Self
Converts to this type from the input type.
Source§impl From<PendingKvListTask> for AsyncItem
impl From<PendingKvListTask> for AsyncItem
Source§fn from(task: PendingKvListTask) -> Self
fn from(task: PendingKvListTask) -> Self
Converts to this type from the input type.
Source§impl From<PendingKvLookupTask> for AsyncItem
impl From<PendingKvLookupTask> for AsyncItem
Source§fn from(task: PendingKvLookupTask) -> Self
fn from(task: PendingKvLookupTask) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !Freeze for AsyncItem
impl !RefUnwindSafe for AsyncItem
impl Send for AsyncItem
impl Sync for AsyncItem
impl Unpin for AsyncItem
impl !UnwindSafe for AsyncItem
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> GetSetFdFlags for T
impl<T> GetSetFdFlags for T
Source§fn get_fd_flags(&self) -> Result<FdFlags, Error>where
T: AsFilelike,
fn get_fd_flags(&self) -> Result<FdFlags, Error>where
T: AsFilelike,
Query the “status” flags for the
self file descriptor.Source§fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>where
T: AsFilelike,
fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>where
T: AsFilelike,
Source§fn set_fd_flags(&mut self, set_fd_flags: SetFdFlags<T>) -> Result<(), Error>where
T: AsFilelike,
fn set_fd_flags(&mut self, set_fd_flags: SetFdFlags<T>) -> Result<(), Error>where
T: AsFilelike,
Set the “status” flags for the
self file descriptor. Read moreSource§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more