pub struct CopyBatch { /* private fields */ }Expand description
Batches multiple copy commands for efficient submission.
Implementations§
Source§impl CopyBatch
impl CopyBatch
Sourcepub fn push(&mut self, cmd: CopyCommand)
pub fn push(&mut self, cmd: CopyCommand)
Add a copy command to the batch.
Sourcepub fn total_bytes(&self) -> u64
pub fn total_bytes(&self) -> u64
Total bytes to be copied.
Sourcepub fn drain(&mut self) -> Vec<CopyCommand>
pub fn drain(&mut self) -> Vec<CopyCommand>
Drain all commands from the batch.
Sourcepub fn has_hazards(&self) -> bool
pub fn has_hazards(&self) -> bool
Check if any commands in the batch alias with each other.
Sourcepub fn split_independent(self) -> Vec<Vec<CopyCommand>>
pub fn split_independent(self) -> Vec<Vec<CopyCommand>>
Split the batch into independent sub-batches that can run in parallel.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CopyBatch
impl RefUnwindSafe for CopyBatch
impl Send for CopyBatch
impl Sync for CopyBatch
impl Unpin for CopyBatch
impl UnsafeUnpin for CopyBatch
impl UnwindSafe for CopyBatch
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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