Method
new
(in_buf: &'inp [T], out_buf: &'out mut [T])
Source from the content-addressed store, hash-verified
| 70 | /// If length of slices is not equal to each other. |
| 71 | #[inline(always)] |
| 72 | pub fn new(in_buf: &'inp [T], out_buf: &'out mut [T]) -> Result<Self, NotEqualError> { |
| 73 | if in_buf.len() != out_buf.len() { |
| 74 | Err(NotEqualError) |
| 75 | } else { |
| 76 | Ok(Self { |
| 77 | in_ptr: in_buf.as_ptr(), |
| 78 | out_ptr: out_buf.as_mut_ptr(), |
| 79 | len: in_buf.len(), |
| 80 | _pd: Default::default(), |
| 81 | }) |
| 82 | } |
| 83 | } |
| 84 | |
| 85 | /// Get length of the inner buffers. |
| 86 | #[inline(always)] |
Callers
nothing calls this directly
Tested by
no test coverage detected