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

Class InOutBufReserved

inout/src/reserved.rs:15–21  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

13/// do not overlap. Length of the output slice is always equal or bigger than
14/// length of the input slice.
15pub struct InOutBufReserved<'inp, 'out, T> {
16 in_ptr: *const T,
17 out_ptr: *mut T,
18 in_len: usize,
19 out_len: usize,
20 _pd: PhantomData<(&'inp T, &'out mut T)>,
21}
22
23impl<'a, T> InOutBufReserved<'a, 'a, T> {
24 /// Crate [`InOutBufReserved`] from a single mutable slice.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected