#[non_exhaustive]pub struct AsyncCallback<Request, Streams: StreamPack = ()> {
pub request: Request,
pub streams: Streams::StreamChannels,
pub channel: Channel,
pub source: Entity,
pub session: Entity,
}Expand description
Use AsyncCallback to indicate that your system or function is meant to define
an async Callback. An async callback is not associated with any entity,
and it 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: RequestThe input data of the request
streams: Streams::StreamChannelsStream channels that will let you send stream information. This will
usually be a StreamChannel or a (possibly nested) tuple of
StreamChannels, whichever matches the StreamPack description.
channel: ChannelThe channel that allows querying and syncing with the world while the callback executes asynchronously.
source: EntityThe node in a workflow or series that asked for the callback
session: EntityThe unique session ID for the workflow
Auto Trait Implementations§
impl<Request, Streams> Freeze for AsyncCallback<Request, Streams>
impl<Request, Streams> RefUnwindSafe for AsyncCallback<Request, Streams>
impl<Request, Streams> Send for AsyncCallback<Request, Streams>where
Request: Send,
impl<Request, Streams> Sync for AsyncCallback<Request, Streams>
impl<Request, Streams> Unpin for AsyncCallback<Request, Streams>
impl<Request, Streams> UnwindSafe for AsyncCallback<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