(target: &mut T, source: &S)
| 901 | /// with the contents of another byte slice. |
| 902 | #[inline(always)] |
| 903 | pub fn copy<T, S>(target: &mut T, source: &S) |
| 904 | where |
| 905 | T: AsMut<[u8]> + ?Sized, |
| 906 | S: AsRef<[u8]> + ?Sized, |
| 907 | { |
| 908 | let target_slice = target.as_mut(); |
| 909 | let source_slice = source.as_ref(); |
| 910 | assert!(target_slice.len() >= source_slice.len()); |
| 911 | unsafe { |
| 912 | sz_copy( |
| 913 | target_slice.as_mut_ptr() as *mut c_void, |
| 914 | source_slice.as_ptr() as *const c_void, |
| 915 | source_slice.len(), |
| 916 | ); |
| 917 | } |
| 918 | } |
| 919 | |
| 920 | /// Performs a lookup transformation (LUT), mapping contents of a buffer into the same or other |
| 921 | /// memory region, taking a byte substitution value from the provided table. |
searching dependent graphs…