uni_service_manager 0.1.11

A crate for for managing cross platform OS services
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use std::ffi::OsString;

use uni_error::*;

use crate::ServiceErrKind;

pub(crate) fn os_string_to_string(
    os_string: impl Into<OsString>,
) -> UniResult<String, ServiceErrKind> {
    os_string
        .into()
        .into_string()
        .map_err(|_| ServiceErrKind::BadUtf8.into_error())
}