MCPcopy Create free account
hub / github.com/RustCrypto/utils / InOutBuf

Class InOutBuf

inout/src/inout_buf.rs:11–16  ·  view source on GitHub ↗

Custom slice type which references one immutable (input) slice and one mutable (output) slice of equal length. Input and output slices are either the same or do not overlap.

Source from the content-addressed store, hash-verified

9/// mutable (output) slice of equal length. Input and output slices are
10/// either the same or do not overlap.
11pub struct InOutBuf<'inp, 'out, T> {
12 pub(crate) in_ptr: *const T,
13 pub(crate) out_ptr: *mut T,
14 pub(crate) len: usize,
15 pub(crate) _pd: PhantomData<(&'inp T, &'out mut T)>,
16}
17
18impl<'a, T> From<&'a mut [T]> for InOutBuf<'a, 'a, T> {
19 #[inline(always)]

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected