pub struct AsyncIOSystem<I: Send, O: Send> { /* private fields */ }Expand description
Represents a registered System that accepts input and returns output, and can be run
asynchronously.
Dropping an AsyncIOSystem will not unregister it. Use AsyncSystemIO::unregister()
to clean up an AsyncSystemIO from the main bevy World.
The easiest way to get an AsyncIOSystem is with AsyncWorld::register_io_system().
Implementations§
Source§impl<I: Send + 'static, O: Send + 'static> AsyncIOSystem<I, O>
impl<I: Send + 'static, O: Send + 'static> AsyncIOSystem<I, O>
Sourcepub async fn unregister(self)
pub async fn unregister(self)
Unregister the system.
If multiple clones of the AsyncIOSystem exist, a reference counter will be decremented instead. The system will be unregistered when the counter decrements to zero.
Trait Implementations§
Auto Trait Implementations§
impl<I, O> Freeze for AsyncIOSystem<I, O>
impl<I, O> RefUnwindSafe for AsyncIOSystem<I, O>
impl<I, O> Send for AsyncIOSystem<I, O>
impl<I, O> Sync for AsyncIOSystem<I, O>
impl<I, O> Unpin for AsyncIOSystem<I, O>
impl<I, O> UnwindSafe for AsyncIOSystem<I, O>
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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.