pub struct ParallelCtxRef<'a, T> { /* private fields */ }Expand description
A handle to a &'a T borrow that is Send + Sync when T: ParallelEncodeCtx.
Worker closures use it to reach the immutable subset of the backend context
they need while recording commands into their own command buffer/list.
The borrow is held directly, so its lifetime is enforced by the type. The
wrapper is only used inside each backend’s parallel-encoder fan-out in
graph_exec.rs, which joins all workers before the outer borrow returns. The
Send/Sync claim rests entirely on the T: ParallelEncodeCtx marker.
Implementations§
Trait Implementations§
Source§impl<T> Clone for ParallelCtxRef<'_, T>
impl<T> Clone for ParallelCtxRef<'_, T>
impl<T> Copy for ParallelCtxRef<'_, T>
impl<T: ParallelEncodeCtx> Send for ParallelCtxRef<'_, T>
impl<T: ParallelEncodeCtx> Sync for ParallelCtxRef<'_, T>
Auto Trait Implementations§
impl<'a, T> Freeze for ParallelCtxRef<'a, T>
impl<'a, T> RefUnwindSafe for ParallelCtxRef<'a, T>where
&'a T: RefUnwindSafe,
impl<'a, T> Unpin for ParallelCtxRef<'a, T>
impl<'a, T> UnsafeUnpin for ParallelCtxRef<'a, T>where
&'a T: UnsafeUnpin,
impl<'a, T> UnwindSafe for ParallelCtxRef<'a, T>where
&'a T: UnwindSafe,
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