MCPcopy Create free account
hub / github.com/ashvardanian/StringZilla / fill

Function fill

rust/stringzilla.rs:889–897  ·  view source on GitHub ↗
(target: &mut T, value: u8)

Source from the content-addressed store, hash-verified

887/// zeroing out a buffer or initializing a buffer with a specific byte pattern.
888#[inline(always)]
889pub fn fill<T>(target: &mut T, value: u8)
890where
891 T: AsMut<[u8]> + ?Sized,
892{
893 let target_slice = target.as_mut();
894 unsafe {
895 sz_fill(target_slice.as_ptr() as *const c_void, target_slice.len(), value);
896 }
897}
898
899/// Copies the contents of `source` into `target`, overwriting the existing contents of `target`.
900/// This function is useful for scenarios where you need to replace the contents of a byte slice

Callers

nothing calls this directly

Calls 3

as_ptrMethod · 0.80
lenMethod · 0.80
sz_fillFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…