Skip to main content

os_values

Function os_values 

Source
pub fn os_values<'t, 'v, T: From<OsString>>(
    values: Vec<Vec<u8>>,
    name: &'t str,
) -> Result<Vec<T>, Error<'t, 'v>>
Expand description

Convert every repeated value of one path-like field, reporting name for the first the platform cannot hold.

T is what the field collects — PathBuf or OsString — so one body serves both. The same platform note as os_string_from_bytes applies: lossless on Unix, partial on Windows. The empty case is answered at the field for the reason utf8_values gives.