INNER CODE UNIT · Rust

fmt

ilya-zlobintsev/LACT · lact-client/src/lib.rs:259

    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
        f.debug_struct("DaemonClient")
            .field("embedded", &self.embedded)
            .finish()
    }
}

fn get_socket_path() -> Option<PathBuf> {
    let root_path = PathBuf::from("/run/lactd.sock");

    if root_path.exists() {
        return Some(root_path);
    }

    let uid = getuid();
    let user_path = PathBuf::from(format!("/run/user/{}/lactd.sock", uid));

    if user_path.exists() {

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…