pub struct ExecutableTaskGraph<W: ?Sized> { /* private fields */ }
Expand description
A TaskGraph
that has been compiled into an executable form.
Implementations§
Source§impl<W: ?Sized> ExecutableTaskGraph<W>
impl<W: ?Sized> ExecutableTaskGraph<W>
Source§impl<W: ?Sized + 'static> ExecutableTaskGraph<W>
impl<W: ?Sized + 'static> ExecutableTaskGraph<W>
Sourcepub unsafe fn execute(
&self,
resource_map: ResourceMap<'_>,
world: &W,
pre_present_notify: impl FnOnce(),
) -> Result<(), ExecuteError>
pub unsafe fn execute( &self, resource_map: ResourceMap<'_>, world: &W, pre_present_notify: impl FnOnce(), ) -> Result<(), ExecuteError>
Executes the next frame of the [flight] given by flight_id
.
§Safety
- There must be no other task graphs executing that access any of the same subresources as
self
. - A subresource in flight must not be accessed in more than one frame in flight.
§Panics
- Panics if
resource_map
doesn’t map the virtual resources ofself
exhaustively. - Panics if
self.flight_id()
is invalid. - Panics if another thread is already executing a task graph using the flight.
- Panics if
resource_map
maps to any swapchain that isn’t owned by the flight. - Panics if the oldest frame of the flight wasn’t waited on.
Source§impl<W: ?Sized> ExecutableTaskGraph<W>
impl<W: ?Sized> ExecutableTaskGraph<W>
Sourcepub fn task_node(&self, id: NodeId) -> Result<&TaskNode<W>, TaskGraphError>
pub fn task_node(&self, id: NodeId) -> Result<&TaskNode<W>, TaskGraphError>
Returns a reference to the task node corresponding to id
.
Sourcepub fn task_node_mut(
&mut self,
id: NodeId,
) -> Result<&mut TaskNode<W>, TaskGraphError>
pub fn task_node_mut( &mut self, id: NodeId, ) -> Result<&mut TaskNode<W>, TaskGraphError>
Returns a mutable reference to the task node corresponding to id
.
Sourcepub fn task_nodes(&self) -> TaskNodes<'_, W> ⓘ
pub fn task_nodes(&self) -> TaskNodes<'_, W> ⓘ
Returns an iterator over all TaskNode
s.
Sourcepub fn task_nodes_mut(&mut self) -> TaskNodesMut<'_, W> ⓘ
pub fn task_nodes_mut(&mut self) -> TaskNodesMut<'_, W> ⓘ
Returns an iterator over all TaskNode
s that allows you to mutate them.
Trait Implementations§
Source§impl<W: ?Sized> Debug for ExecutableTaskGraph<W>
impl<W: ?Sized> Debug for ExecutableTaskGraph<W>
Source§impl<W: ?Sized> DeviceOwned for ExecutableTaskGraph<W>
impl<W: ?Sized> DeviceOwned for ExecutableTaskGraph<W>
Auto Trait Implementations§
impl<W> !Freeze for ExecutableTaskGraph<W>
impl<W> !RefUnwindSafe for ExecutableTaskGraph<W>
impl<W> Send for ExecutableTaskGraph<W>where
W: ?Sized,
impl<W> !Sync for ExecutableTaskGraph<W>
impl<W> Unpin for ExecutableTaskGraph<W>where
W: ?Sized,
impl<W> !UnwindSafe for ExecutableTaskGraph<W>
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