#[non_exhaustive]pub struct AsyncMap<Request, Streams: StreamPack = ()> {
pub request: Request,
pub streams: Streams::StreamChannels,
pub channel: Channel,
pub source: Entity,
pub session: Entity,
}
Expand description
Use AsyncMap to indicate that your function is an async map. A Map is not associated with any entity, and it cannot be a Bevy System. These restrictions allow them to be processed more efficiently.
An async map must return a Future<Output=Response>
that will be polled by the async task pool.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.request: Request
The input data of the request
streams: Streams::StreamChannels
Stream channels that will let you send stream information. This will
usually be a StreamChannel
or a (possibly nested) tuple of
StreamChannel
s, whichever matches the StreamPack
description.
channel: Channel
The channel that allows querying and syncing with the world while the map executes asynchronously.
source: Entity
The node in a workflow or series that asked for the callback
session: Entity
The unique session ID for the workflow
Auto Trait Implementations§
impl<Request, Streams> Freeze for AsyncMap<Request, Streams>
impl<Request, Streams> RefUnwindSafe for AsyncMap<Request, Streams>
impl<Request, Streams> Send for AsyncMap<Request, Streams>where
Request: Send,
impl<Request, Streams> Sync for AsyncMap<Request, Streams>
impl<Request, Streams> Unpin for AsyncMap<Request, Streams>
impl<Request, Streams> UnwindSafe for AsyncMap<Request, Streams>
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> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Converts
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
, which can then be
downcast
into Box<dyn ConcreteType>
where ConcreteType
implements Trait
.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Converts
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
, which can then be further
downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Converts
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Converts
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
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