Method lrs::string::NoNullStr::from_bytes_unchecked

Casts a byte slice to a NoNullStr without checking it for validity.

Syntax

impl NoNullStr {
    unsafe fn from_bytes_unchecked(bytes: &[u8]) -> &NoNullStr
}

Arguments

NameDescription
bytes

The slice to be interpreted as a NoNullStr.

Remarks

If the slice contains null bytes, the behavior is undefined.