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

Method from_ref_mut

inout/src/inout_buf.rs:58–65  ·  view source on GitHub ↗
(in_val: &'inp T, out_val: &'out mut T)

Source from the content-addressed store, hash-verified

56 /// Create `InOutBuf` from a pair of immutable and mutable references.
57 #[inline(always)]
58 pub fn from_ref_mut(in_val: &'inp T, out_val: &'out mut T) -> Self {
59 Self {
60 in_ptr: ptr::from_ref::<T>(in_val),
61 out_ptr: ptr::from_mut::<T>(out_val),
62 len: 1,
63 _pd: PhantomData,
64 }
65 }
66
67 /// Create `InOutBuf` from immutable and mutable slices.
68 ///

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected