pub fn from_bytes(buf: impl Into<Vec<u8>>) -> Result<Self, (Vec<u8>, Utf8Error)> {
        let buf = buf.into();
        let buf = Self::validate_utf8(buf)?;
        Ok(Self::strip_trailing_null_byte(buf))
    }
Creates a new instance of `Utf8Paths0` from a `Vec<u8>`, performing a UTF-8 validation
check on the buffer.

The buffer may, but does not need to, have a trailing null byte.

## Errors

If any paths inside the string weren't valid UTF-8, this returns the first path that failed
to parse and the error returned.
tools/determinator/src/paths0.rs