Function plain::as_mut_bytes [] [src]

pub fn as_mut_bytes<S: ?Sized>(s: &mut S) -> &mut [u8] where S: Plain

Safely converts a reference to a Plain type to a mutable byte slice of appropriate length.

In contrast to as_bytes(), argument must be Plain, in order to prevent invoking UB via writing illegal values into it.

This function cannot fail.