11//! Types for serializing across D-Bus instances
22
3- use std:: fmt:: Display ;
3+ use std:: { collections :: HashMap , fmt:: Display } ;
44
55use serde:: {
66 Deserialize , Serialize ,
@@ -11,7 +11,7 @@ use zvariant::{
1111 SerializeDict , Signature , Structure , StructureBuilder , Type , Value , signature:: Fields ,
1212} ;
1313
14- use crate :: model:: { BackgroundEvent , Device , Operation , RequestingApplication } ;
14+ use crate :: model:: { BackgroundEvent , Operation , RequestingApplication } ;
1515
1616const TAG_VALUE_SIGNATURE : & Signature = & Signature :: Structure ( Fields :: Static {
1717 fields : & [ & Signature :: U8 , & Signature :: Variant ] ,
@@ -113,6 +113,14 @@ pub struct CreateCredentialResponse {
113113 public_key : Option < CreatePublicKeyCredentialResponse > ,
114114}
115115
116+ impl NoneValue for CreateCredentialResponse {
117+ type NoneType = HashMap < String , OwnedValue > ;
118+
119+ fn null_value ( ) -> Self :: NoneType {
120+ HashMap :: new ( )
121+ }
122+ }
123+
116124#[ derive( Clone , Debug , DeserializeDict , Type ) ]
117125#[ zvariant( signature = "dict" ) ]
118126pub struct CreatePublicKeyCredentialRequest {
@@ -197,8 +205,6 @@ impl TryFrom<&Value<'_>> for crate::model::Error {
197205pub struct GetCredentialRequest {
198206 pub origin : Option < String > ,
199207 pub is_same_origin : Option < bool > ,
200- #[ zvariant( rename = "type" ) ]
201- pub r#type : String ,
202208 #[ zvariant( rename = "publicKey" ) ]
203209 pub public_key : Option < GetPublicKeyCredentialRequest > ,
204210}
0 commit comments