[][src]Function pre::core::str::from_utf8_unchecked_mut

pub unsafe fn from_utf8_unchecked_mut(v: &mut [u8]) -> &mut str

core::str::from_utf8_unchecked_mut with preconditions.

This function behaves exactly like core::str::from_utf8_unchecked_mut, but also has preconditions checked by pre.

You should also read the Safety section on the documentation of core::str::from_utf8_unchecked_mut.

This function has preconditions

This function has the following precondition generated by the pre attribute:

  • the content of v is valid UTF-8

To call the function you need to assure that the precondition holds:

This example is not tested
#[assure(
    "the content of `v` is valid UTF-8",
    reason = "<specify the reason why you can assure this here>"
)]
from_utf8_unchecked_mut(/* parameters omitted */);