pub struct CommandBatcher { /* private fields */ }Expand description
A high-performance command batcher that groups commands for efficient processing
Implementations§
Source§impl CommandBatcher
impl CommandBatcher
pub fn new(config: BatchConfig) -> Self
Sourcepub fn add_command(&mut self, command: Command) -> Result<Option<CommandBatch>>
pub fn add_command(&mut self, command: Command) -> Result<Option<CommandBatch>>
Add a command to the batch buffer
Sourcepub fn flush(&mut self) -> Option<CommandBatch>
pub fn flush(&mut self) -> Option<CommandBatch>
Force flush current batch regardless of size or time
Sourcepub fn stats(&self) -> &BatchStats
pub fn stats(&self) -> &BatchStats
Get current statistics
Sourcepub fn update_config(&mut self, config: BatchConfig)
pub fn update_config(&mut self, config: BatchConfig)
Update configuration (for runtime tuning)
Sourcepub fn buffer_len(&self) -> usize
pub fn buffer_len(&self) -> usize
Get current buffer length
Auto Trait Implementations§
impl Forget for CommandBatcher
impl Freeze for CommandBatcher
impl Move for CommandBatcher
impl RefUnwindSafe for CommandBatcher
impl Send for CommandBatcher
impl Sync for CommandBatcher
impl Unpin for CommandBatcher
impl UnsafeUnpin for CommandBatcher
impl UnwindSafe for CommandBatcher
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