Function pre::core::str::from_utf8_unchecked [−][src]
pub unsafe fn from_utf8_unchecked(v: &[u8]) -> &str
Expand description
core::str::from_utf8_unchecked
with preconditions.
This function behaves exactly like core::str::from_utf8_unchecked
, but also has preconditions checked by pre
.
You should also read the Safety section on the documentation of core::str::from_utf8_unchecked
.
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:
ⓘ
#[assure(
"the content of `v` is valid UTF-8",
reason = "<specify the reason why you can assure this here>"
)]
from_utf8_unchecked(/* parameters omitted */);