git.delta.rocks / remowt / refs/commits / 7c2fb57d5b71

difftreelog

source

crates/polkit-shared/src/lib.rs796 Bsourcehistory
1use std::collections::HashMap;23use serde::{Deserialize, Serialize};4use zbus::zvariant::{OwnedValue, Type};56#[derive(Serialize, Deserialize, Type, PartialEq, Debug)]7pub struct Identity {8    pub kind: String,9    pub details: HashMap<String, OwnedValue>,10}1112impl Clone for Identity {13    fn clone(&self) -> Self {14        Self {15            kind: self.kind.clone(),16            details: self17                .details18                .iter()19                .map(|(k, v)| (k.clone(), v.try_clone().expect("no fds are expected")))20                .collect(),21        }22    }23}2425#[derive(Serialize, Deserialize, Type, PartialEq, Debug)]26pub struct BackendRequest {27    pub cookie: String,28    pub environment: HashMap<String, String>,29    pub prompter_path: String,30    pub identity: Identity,31}