MCPcopy Create free account
hub / github.com/apache/arrow-rs / clear

Method clear

arrow-buffer/src/buffer/mutable.rs:502–510  ·  view source on GitHub ↗

Clear all existing data from this buffer.

(&mut self)

Source from the content-addressed store, hash-verified

500
501 /// Clear all existing data from this buffer.
502 pub fn clear(&mut self) {
503 self.len = 0;
504 #[cfg(feature = "pool")]
505 {
506 if let Some(reservation) = self.reservation.lock().unwrap().as_mut() {
507 reservation.resize(self.len);
508 }
509 }
510 }
511
512 /// Returns the data stored in this buffer as a slice.
513 pub fn as_slice(&self) -> &[u8] {

Callers 3

test_truncate_with_poolFunction · 0.45
regenMethod · 0.45

Calls 1

resizeMethod · 0.45

Tested by 2

test_truncate_with_poolFunction · 0.36