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

Method from_mut

inout/src/inout_buf.rs:34–42  ·  view source on GitHub ↗
(val: &'a mut T)

Source from the content-addressed store, hash-verified

32 /// Create `InOutBuf` from a single mutable reference.
33 #[inline(always)]
34 pub fn from_mut(val: &'a mut T) -> InOutBuf<'a, 'a, T> {
35 let p = ptr::from_mut(val);
36 Self {
37 in_ptr: p,
38 out_ptr: p,
39 len: 1,
40 _pd: PhantomData,
41 }
42 }
43}
44
45impl<'inp, 'out, T> IntoIterator for InOutBuf<'inp, 'out, T> {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected