pub struct Dispatch<'a, A> {
pub app: &'a mut A,
pub domains: &'a mut Domains,
pub views: &'a mut Views,
/* private fields */
}Expand description
Immediate application at a boundary; every handle it returns is live.
Fields§
§app: &'a mut A§domains: &'a mut Domains§views: &'a mut ViewsImplementations§
Source§impl<'a, A: Stores> Dispatch<'a, A>
impl<'a, A: Stores> Dispatch<'a, A>
pub fn prepare(&mut self, geometry: PreparedGeometry) -> PreparedId
pub fn prepared(&self, id: PreparedId) -> Option<&PreparedGeometry>
pub fn add_palette(&mut self, colors: Vec<[f32; 4]>) -> PaletteId
pub fn palette(&self, id: PaletteId) -> Option<&[[f32; 4]]>
pub fn add_material(&mut self, material: Material) -> MaterialId
pub fn material(&self, id: MaterialId) -> Option<&Material>
pub fn spawn(&mut self, bundle: SpawnBundle<A>) -> Result<Entity, Rejection>
pub fn attach<T: Send + 'static>(
&mut self,
entity: Entity,
row: T,
) -> Result<(), Rejection>where
A: HasStore<T>,
pub fn link<T: Send + 'static>(
&mut self,
from: Entity,
to: Entity,
data: T,
) -> Result<LinkId, Rejection>where
A: HasRelation<T>,
pub fn attach_instance<S: DomainSpace>( &mut self, domain: DomainHandle<S>, entity: Entity, instance: Instance, ) -> Result<(), Rejection>
pub fn attach_field<S: DomainSpace>( &mut self, domain: DomainHandle<S>, entity: Entity, field: Field, ) -> Result<(), Rejection>
pub fn despawn(&mut self, entity: Entity) -> Result<(), Rejection>
pub fn apply(&mut self, command: Command<A>) -> Result<Outcome, Rejection>
pub fn entities(&self) -> &Entities
Auto Trait Implementations§
impl<'a, A> Freeze for Dispatch<'a, A>
impl<'a, A> !RefUnwindSafe for Dispatch<'a, A>
impl<'a, A> Send for Dispatch<'a, A>where
A: Send,
impl<'a, A> !Sync for Dispatch<'a, A>
impl<'a, A> Unpin for Dispatch<'a, A>
impl<'a, A> UnsafeUnpin for Dispatch<'a, A>
impl<'a, A> !UnwindSafe for Dispatch<'a, A>
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