Function plain::copy_from_bytes

source ·
pub fn copy_from_bytes<T>(into: &mut T, bytes: &[u8]) -> Result<(), Error>where
    T: Plain + ?Sized,
Expand description

Copies data from a byte slice into existing memory. Suitable when from_bytes() would normally be used, but the data is not aligned properly in memory.

For an example how to use it, see crate-level documentation.