[INFO] crate varlink_stdinterfaces 7.0.0 is already in cache [INFO] extracting crate varlink_stdinterfaces 7.0.0 into work/ex/pr-61874/sources/master#9f06855064ed06a50c496577b21ca50f92a2e67d/reg/varlink_stdinterfaces/7.0.0 [INFO] extracting crate varlink_stdinterfaces 7.0.0 into work/ex/pr-61874/sources/try#d3301713b54af69ca9de941a8c6b0d8287dbd6df/reg/varlink_stdinterfaces/7.0.0 [INFO] validating manifest of varlink_stdinterfaces-7.0.0 on toolchain master#9f06855064ed06a50c496577b21ca50f92a2e67d [INFO] running `"/mnt/big/crater/work/local/cargo-home/bin/cargo" "+9f06855064ed06a50c496577b21ca50f92a2e67d-alt" "read-manifest" "--manifest-path" "Cargo.toml"` [INFO] validating manifest of varlink_stdinterfaces-7.0.0 on toolchain try#d3301713b54af69ca9de941a8c6b0d8287dbd6df [INFO] running `"/mnt/big/crater/work/local/cargo-home/bin/cargo" "+d3301713b54af69ca9de941a8c6b0d8287dbd6df-alt" "read-manifest" "--manifest-path" "Cargo.toml"` [INFO] started frobbing varlink_stdinterfaces-7.0.0 [INFO] finished frobbing varlink_stdinterfaces-7.0.0 [INFO] frobbed toml for varlink_stdinterfaces-7.0.0 written to work/ex/pr-61874/sources/master#9f06855064ed06a50c496577b21ca50f92a2e67d/reg/varlink_stdinterfaces/7.0.0/Cargo.toml [INFO] started frobbing varlink_stdinterfaces-7.0.0 [INFO] finished frobbing varlink_stdinterfaces-7.0.0 [INFO] frobbed toml for varlink_stdinterfaces-7.0.0 written to work/ex/pr-61874/sources/try#d3301713b54af69ca9de941a8c6b0d8287dbd6df/reg/varlink_stdinterfaces/7.0.0/Cargo.toml [INFO] running `"/mnt/big/crater/work/local/cargo-home/bin/cargo" "+9f06855064ed06a50c496577b21ca50f92a2e67d-alt" "generate-lockfile" "--manifest-path" "Cargo.toml" "-Zno-index-update"` [INFO] running `"/mnt/big/crater/work/local/cargo-home/bin/cargo" "+d3301713b54af69ca9de941a8c6b0d8287dbd6df-alt" "generate-lockfile" "--manifest-path" "Cargo.toml" "-Zno-index-update"` [INFO] running `"/mnt/big/crater/work/local/cargo-home/bin/cargo" "+9f06855064ed06a50c496577b21ca50f92a2e67d-alt" "fetch" "--locked" "--manifest-path" "Cargo.toml"` [INFO] running `"/mnt/big/crater/work/local/cargo-home/bin/cargo" "+d3301713b54af69ca9de941a8c6b0d8287dbd6df-alt" "fetch" "--locked" "--manifest-path" "Cargo.toml"` [INFO] checking varlink_stdinterfaces-7.0.0 against try#d3301713b54af69ca9de941a8c6b0d8287dbd6df for pr-61874 [INFO] running `"docker" "create" "-v" "/mnt/big/crater/work/local/target-dirs/pr-61874/worker-1/try#d3301713b54af69ca9de941a8c6b0d8287dbd6df:/opt/crater/target:rw,Z" "-v" "/mnt/big/crater/work/ex/pr-61874/sources/try#d3301713b54af69ca9de941a8c6b0d8287dbd6df/reg/varlink_stdinterfaces/7.0.0:/opt/crater/workdir:ro,Z" "-v" "/mnt/big/crater/work/local/cargo-home:/opt/crater/cargo-home:ro,Z" "-v" "/mnt/big/crater/work/local/rustup-home:/opt/crater/rustup-home:ro,Z" "-e" "USER_ID=1000" "-e" "SOURCE_DIR=/opt/crater/workdir" "-e" "MAP_USER_ID=1000" "-e" "CARGO_TARGET_DIR=/opt/crater/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/crater/cargo-home" "-e" "RUSTUP_HOME=/opt/crater/rustup-home" "-w" "/opt/crater/workdir" "-m" "1536M" "--network" "none" "rustops/crates-build-env" "/opt/crater/cargo-home/bin/cargo" "+d3301713b54af69ca9de941a8c6b0d8287dbd6df-alt" "check" "--frozen" "--all" "--all-targets"` [INFO] [stdout] 60a63a275d808138c6cd66a37661cfba33127ddcddf65a373654cedfa294b660 [INFO] running `"docker" "start" "-a" "60a63a275d808138c6cd66a37661cfba33127ddcddf65a373654cedfa294b660"` [INFO] [stderr] Compiling varlink_parser v4.0.2 [INFO] [stderr] Compiling chainerror v0.4.3 [INFO] [stderr] Checking varlink v7.0.1 [INFO] [stderr] Compiling varlink_generator v7.1.0 [INFO] [stderr] Compiling varlink_stdinterfaces v7.0.0 (/opt/crater/workdir) [INFO] [stderr] warning: trait objects without an explicit `dyn` are deprecated [INFO] [stderr] --> /opt/crater/target/debug/build/varlink_stdinterfaces-54f76819d3207c73/out/org.varlink.resolver.rs:1:5043 [INFO] [stderr] | [INFO] [stderr] 1 | use chainerror :: * ; use serde_derive :: { { Deserialize , Serialize } } ; use serde_json ; use std :: io :: BufRead ; use std :: sync :: { { Arc , RwLock } } ; use varlink :: { { self , CallTrait } } ; # [ derive ( Serialize , Deserialize , Debug , PartialEq , Clone ) ] pub struct InterfaceNotFound_Args { pub r#interface : String , } pub trait VarlinkCallError : varlink :: CallTrait { fn reply_interface_not_found ( & mut self , r#interface : String ) -> varlink :: Result < ( ) > { self . reply_struct ( varlink :: Reply :: error ( "org.varlink.resolver.InterfaceNotFound" , Some ( serde_json :: to_value ( InterfaceNotFound_Args { r#interface } ) . map_err ( minto_cherr ! ( ) ) ? ) ) ) } } impl < 'a > VarlinkCallError for varlink :: Call < 'a > { } # [ allow ( dead_code ) ] # [ derive ( Clone , PartialEq , Debug ) ] pub enum ErrorKind { Io_Error ( :: std :: io :: ErrorKind ) , SerdeJson_Error ( serde_json :: error :: Category ) , Varlink_Error , VarlinkReply_Error ( varlink :: Reply ) , Generic , InterfaceNotFound ( Option < InterfaceNotFound_Args > ) } impl :: std :: fmt :: Display for ErrorKind { fn fmt ( & self , f : & mut :: std :: fmt :: Formatter ) -> :: std :: fmt :: Result { match self { ErrorKind :: Io_Error ( _ ) => write ! ( f , "IO error" ) , ErrorKind :: SerdeJson_Error ( _ ) => { write ! ( f , "(De)Serialization Error" ) } ErrorKind :: Varlink_Error => write ! ( f , "Varlink Error" ) , ErrorKind :: VarlinkReply_Error ( v ) => write ! ( f , "Unknown error reply: '{:#?}'" , v ) , ErrorKind :: Generic => Ok ( ( ) ) , ErrorKind :: InterfaceNotFound ( v ) => write ! ( f , "org.varlink.resolver.InterfaceNotFound: {:#?}" , v ) } } } impl :: std :: error :: Error for ErrorKind { } impl ChainErrorFrom < std :: io :: Error > for ErrorKind { fn chain_error_from ( e : std :: io :: Error , line_filename : Option < ( u32 , & 'static str ) > , ) -> ChainError < Self > { ChainError :: < _ > :: new ( ErrorKind :: Io_Error ( e . kind ( ) ) , Some ( Box :: from ( e ) ) , line_filename ) } } impl ChainErrorFrom < serde_json :: error :: Error > for ErrorKind { fn chain_error_from ( e : serde_json :: error :: Error , line_filename : Option < ( u32 , & 'static str ) > , ) -> ChainError < Self > { ChainError :: < _ > :: new ( ErrorKind :: SerdeJson_Error ( e . classify ( ) ) , Some ( Box :: from ( e ) ) , line_filename , ) } } impl ChainErrorFrom < varlink :: ErrorKind > for ErrorKind { fn chain_error_from ( e : varlink :: ErrorKind , line_filename : Option < ( u32 , & 'static str ) > , ) -> ChainError < Self > { ChainError :: < _ > :: new ( ErrorKind :: Varlink_Error , Some ( Box :: from ( ChainError :: < _ > :: new ( e , None , line_filename , ) ) ) , line_filename , ) } } # [ allow ( dead_code ) ] pub type Result < T > = ChainResult < T , ErrorKind > ; # [ allow ( dead_code ) ] pub type Error = ErrorKind ; impl ChainErrorFrom < varlink :: Reply > for ErrorKind { # [ allow ( unused_variables ) ] fn chain_error_from ( e : varlink :: Reply , line_filename : Option < ( u32 , & 'static str ) > ) -> ChainError < Self > { if varlink :: ErrorKind :: is_error ( & e ) { let e : varlink :: ErrorKind = e . into ( ) ; return into_cherr ! ( e ) ; } match e { varlink :: Reply { error : Some ( ref t ) , .. } if t == "org.varlink.resolver.InterfaceNotFound" => { match e { varlink :: Reply { parameters : Some ( p ) , .. } => match serde_json :: from_value ( p ) { Ok ( v ) => into_cherr ! ( ErrorKind :: InterfaceNotFound ( v ) ) , Err ( _ ) => into_cherr ! ( ErrorKind :: InterfaceNotFound ( None ) ) , } , _ => into_cherr ! ( ErrorKind :: InterfaceNotFound ( None ) ) , } } _ => into_cherr ! ( ErrorKind :: VarlinkReply_Error ( e ) ) , } } } # [ derive ( Serialize , Deserialize , Debug , PartialEq , Clone ) ] pub struct GetInfo_Reply { pub r#vendor : String , pub r#product : String , pub r#version : String , pub r#url : String , pub r#interfaces : Vec < String > , } impl varlink :: VarlinkReply for GetInfo_Reply { } # [ derive ( Serialize , Deserialize , Debug , PartialEq , Clone ) ] pub struct GetInfo_Args { } pub trait Call_GetInfo : VarlinkCallError { fn reply ( & mut self , r#vendor : String , r#product : String , r#version : String , r#url : String , r#interfaces : Vec < String > ) -> varlink :: Result < ( ) > { self . reply_struct ( GetInfo_Reply { r#vendor , r#product , r#version , r#url , r#interfaces } . into ( ) ) } } impl < 'a > Call_GetInfo for varlink :: Call < 'a > { } # [ derive ( Serialize , Deserialize , Debug , PartialEq , Clone ) ] pub struct Resolve_Reply { pub r#address : String , } impl varlink :: VarlinkReply for Resolve_Reply { } # [ derive ( Serialize , Deserialize , Debug , PartialEq , Clone ) ] pub struct Resolve_Args { pub r#interface : String , } pub trait Call_Resolve : VarlinkCallError { fn reply ( & mut self , r#address : String ) -> varlink :: Result < ( ) > { self . reply_struct ( Resolve_Reply { r#address } . into ( ) ) } } impl < 'a > Call_Resolve for varlink :: Call < 'a > { } pub trait VarlinkInterface { fn get_info ( & self , call : & mut Call_GetInfo , ) -> varlink :: Result < ( ) > ; fn resolve ( & self , call : & mut Call_Resolve , r#interface : String ) -> varlink :: Result < ( ) > ; fn call_upgraded ( & self , _call : & mut varlink :: Call , _bufreader : & mut BufRead ) -> varlink :: Result < Vec < u8 >> { Ok ( Vec :: new ( ) ) } } pub trait VarlinkClientInterface { fn get_info ( & mut self , ) -> varlink :: MethodCall < GetInfo_Args , GetInfo_Reply , Error > ; fn resolve ( & mut self , r#interface : String ) -> varlink :: MethodCall < Resolve_Args , Resolve_Reply , Error > ; } # [ allow ( dead_code ) ] pub struct VarlinkClient { connection : Arc < RwLock < varlink :: Connection >> , } impl VarlinkClient { # [ allow ( dead_code ) ] pub fn new ( connection : Arc < RwLock < varlink :: Connection >> ) -> Self { VarlinkClient { connection , } } } impl VarlinkClientInterface for VarlinkClient { fn get_info ( & mut self , ) -> varlink :: MethodCall < GetInfo_Args , GetInfo_Reply , Error > { varlink :: MethodCall :: < GetInfo_Args , GetInfo_Reply , Error > :: new ( self . connection . clone ( ) , "org.varlink.resolver.GetInfo" , GetInfo_Args { } ) } fn resolve ( & mut self , r#interface : String ) -> varlink :: MethodCall < Resolve_Args , Resolve_Reply , Error > { varlink :: MethodCall :: < Resolve_Args , Resolve_Reply , Error > :: new ( self . connection . clone ( ) , "org.varlink.resolver.Resolve" , Resolve_Args { r#interface } ) } } # [ allow ( dead_code ) ] pub struct VarlinkInterfaceProxy { inner : Box < VarlinkInterface + Send + Sync > , } # [ allow ( dead_code ) ] pub fn new ( inner : Box < VarlinkInterface + Send + Sync > ) -> VarlinkInterfaceProxy { VarlinkInterfaceProxy { inner } } impl varlink :: Interface for VarlinkInterfaceProxy { fn get_description ( & self ) -> & 'static str { "# Interface to resolve reverse-domain interface names to\n# service adresses\ninterface org.varlink.resolver\n\n# Get a list of all resolvable interfaces and information\n# about the resolver's identity.\nmethod GetInfo() -> (\n vendor: string,\n product: string,\n version: string,\n url: string,\n interfaces: []string\n)\n\n# Resolve an interface name to a registered varlink service address\nmethod Resolve(interface: string) -> (address: string)\n\nerror InterfaceNotFound (interface: string)\n" } fn get_name ( & self ) -> & 'static str { "org.varlink.resolver" } fn call_upgraded ( & self , call : & mut varlink :: Call , bufreader : & mut BufRead ) -> varlink :: Result < Vec < u8 >> { self . inner . call_upgraded ( call , bufreader ) } fn call ( & self , call : & mut varlink :: Call ) -> varlink :: Result < ( ) > { let req = call . request . unwrap ( ) ; match req . method . as_ref ( ) { "org.varlink.resolver.GetInfo" => self . inner . get_info ( call as & mut Call_GetInfo ) , "org.varlink.resolver.Resolve" => { if let Some ( args ) = req . parameters . clone ( ) { let args : Resolve_Args = match serde_json :: from_value ( args ) { Ok ( v ) => v , Err ( e ) => { let es = format ! ( "{}" , e ) ; let _ = call . reply_invalid_parameter ( es . clone ( ) ) ; return Err ( into_cherr ! ( varlink :: ErrorKind :: SerdeJsonDe ( es ) ) ) ; } } ; self . inner . resolve ( call as & mut Call_Resolve , args . r#interface ) } else { call . reply_invalid_parameter ( "parameters" . into ( ) ) } } , m => { call . reply_method_not_found ( String :: from ( m ) ) } } } } [INFO] [stderr] | ^^^^^^^^^^^^ help: use `dyn`: `dyn Call_GetInfo` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(bare_trait_objects)] on by default [INFO] [stderr] [INFO] [stderr] warning: trait objects without an explicit `dyn` are deprecated [INFO] [stderr] --> /opt/crater/target/debug/build/varlink_stdinterfaces-54f76819d3207c73/out/org.varlink.resolver.rs:1:5126 [INFO] [stderr] | [INFO] [stderr] 1 | use chainerror :: * ; use serde_derive :: { { Deserialize , Serialize } } ; use serde_json ; use std :: io :: BufRead ; use std :: sync :: { { Arc , RwLock } } ; use varlink :: { { self , CallTrait } } ; # [ derive ( Serialize , Deserialize , Debug , PartialEq , Clone ) ] pub struct InterfaceNotFound_Args { pub r#interface : String , } pub trait VarlinkCallError : varlink :: CallTrait { fn reply_interface_not_found ( & mut self , r#interface : String ) -> varlink :: Result < ( ) > { self . reply_struct ( varlink :: Reply :: error ( "org.varlink.resolver.InterfaceNotFound" , Some ( serde_json :: to_value ( InterfaceNotFound_Args { r#interface } ) . map_err ( minto_cherr ! ( ) ) ? ) ) ) } } impl < 'a > VarlinkCallError for varlink :: Call < 'a > { } # [ allow ( dead_code ) ] # [ derive ( Clone , PartialEq , Debug ) ] pub enum ErrorKind { Io_Error ( :: std :: io :: ErrorKind ) , SerdeJson_Error ( serde_json :: error :: Category ) , Varlink_Error , VarlinkReply_Error ( varlink :: Reply ) , Generic , InterfaceNotFound ( Option < InterfaceNotFound_Args > ) } impl :: std :: fmt :: Display for ErrorKind { fn fmt ( & self , f : & mut :: std :: fmt :: Formatter ) -> :: std :: fmt :: Result { match self { ErrorKind :: Io_Error ( _ ) => write ! ( f , "IO error" ) , ErrorKind :: SerdeJson_Error ( _ ) => { write ! ( f , "(De)Serialization Error" ) } ErrorKind :: Varlink_Error => write ! ( f , "Varlink Error" ) , ErrorKind :: VarlinkReply_Error ( v ) => write ! ( f , "Unknown error reply: '{:#?}'" , v ) , ErrorKind :: Generic => Ok ( ( ) ) , ErrorKind :: InterfaceNotFound ( v ) => write ! ( f , "org.varlink.resolver.InterfaceNotFound: {:#?}" , v ) } } } impl :: std :: error :: Error for ErrorKind { } impl ChainErrorFrom < std :: io :: Error > for ErrorKind { fn chain_error_from ( e : std :: io :: Error , line_filename : Option < ( u32 , & 'static str ) > , ) -> ChainError < Self > { ChainError :: < _ > :: new ( ErrorKind :: Io_Error ( e . kind ( ) ) , Some ( Box :: from ( e ) ) , line_filename ) } } impl ChainErrorFrom < serde_json :: error :: Error > for ErrorKind { fn chain_error_from ( e : serde_json :: error :: Error , line_filename : Option < ( u32 , & 'static str ) > , ) -> ChainError < Self > { ChainError :: < _ > :: new ( ErrorKind :: SerdeJson_Error ( e . classify ( ) ) , Some ( Box :: from ( e ) ) , line_filename , ) } } impl ChainErrorFrom < varlink :: ErrorKind > for ErrorKind { fn chain_error_from ( e : varlink :: ErrorKind , line_filename : Option < ( u32 , & 'static str ) > , ) -> ChainError < Self > { ChainError :: < _ > :: new ( ErrorKind :: Varlink_Error , Some ( Box :: from ( ChainError :: < _ > :: new ( e , None , line_filename , ) ) ) , line_filename , ) } } # [ allow ( dead_code ) ] pub type Result < T > = ChainResult < T , ErrorKind > ; # [ allow ( dead_code ) ] pub type Error = ErrorKind ; impl ChainErrorFrom < varlink :: Reply > for ErrorKind { # [ allow ( unused_variables ) ] fn chain_error_from ( e : varlink :: Reply , line_filename : Option < ( u32 , & 'static str ) > ) -> ChainError < Self > { if varlink :: ErrorKind :: is_error ( & e ) { let e : varlink :: ErrorKind = e . into ( ) ; return into_cherr ! ( e ) ; } match e { varlink :: Reply { error : Some ( ref t ) , .. } if t == "org.varlink.resolver.InterfaceNotFound" => { match e { varlink :: Reply { parameters : Some ( p ) , .. } => match serde_json :: from_value ( p ) { Ok ( v ) => into_cherr ! ( ErrorKind :: InterfaceNotFound ( v ) ) , Err ( _ ) => into_cherr ! ( ErrorKind :: InterfaceNotFound ( None ) ) , } , _ => into_cherr ! ( ErrorKind :: InterfaceNotFound ( None ) ) , } } _ => into_cherr ! ( ErrorKind :: VarlinkReply_Error ( e ) ) , } } } # [ derive ( Serialize , Deserialize , Debug , PartialEq , Clone ) ] pub struct GetInfo_Reply { pub r#vendor : String , pub r#product : String , pub r#version : String , pub r#url : String , pub r#interfaces : Vec < String > , } impl varlink :: VarlinkReply for GetInfo_Reply { } # [ derive ( Serialize , Deserialize , Debug , PartialEq , Clone ) ] pub struct GetInfo_Args { } pub trait Call_GetInfo : VarlinkCallError { fn reply ( & mut self , r#vendor : String , r#product : String , r#version : String , r#url : String , r#interfaces : Vec < String > ) -> varlink :: Result < ( ) > { self . reply_struct ( GetInfo_Reply { r#vendor , r#product , r#version , r#url , r#interfaces } . into ( ) ) } } impl < 'a > Call_GetInfo for varlink :: Call < 'a > { } # [ derive ( Serialize , Deserialize , Debug , PartialEq , Clone ) ] pub struct Resolve_Reply { pub r#address : String , } impl varlink :: VarlinkReply for Resolve_Reply { } # [ derive ( Serialize , Deserialize , Debug , PartialEq , Clone ) ] pub struct Resolve_Args { pub r#interface : String , } pub trait Call_Resolve : VarlinkCallError { fn reply ( & mut self , r#address : String ) -> varlink :: Result < ( ) > { self . reply_struct ( Resolve_Reply { r#address } . into ( ) ) } } impl < 'a > Call_Resolve for varlink :: Call < 'a > { } pub trait VarlinkInterface { fn get_info ( & self , call : & mut Call_GetInfo , ) -> varlink :: Result < ( ) > ; fn resolve ( & self , call : & mut Call_Resolve , r#interface : String ) -> varlink :: Result < ( ) > ; fn call_upgraded ( & self , _call : & mut varlink :: Call , _bufreader : & mut BufRead ) -> varlink :: Result < Vec < u8 >> { Ok ( Vec :: new ( ) ) } } pub trait VarlinkClientInterface { fn get_info ( & mut self , ) -> varlink :: MethodCall < GetInfo_Args , GetInfo_Reply , Error > ; fn resolve ( & mut self , r#interface : String ) -> varlink :: MethodCall < Resolve_Args , Resolve_Reply , Error > ; } # [ allow ( dead_code ) ] pub struct VarlinkClient { connection : Arc < RwLock < varlink :: Connection >> , } impl VarlinkClient { # [ allow ( dead_code ) ] pub fn new ( connection : Arc < RwLock < varlink :: Connection >> ) -> Self { VarlinkClient { connection , } } } impl VarlinkClientInterface for VarlinkClient { fn get_info ( & mut self , ) -> varlink :: MethodCall < GetInfo_Args , GetInfo_Reply , Error > { varlink :: MethodCall :: < GetInfo_Args , GetInfo_Reply , Error > :: new ( self . connection . clone ( ) , "org.varlink.resolver.GetInfo" , GetInfo_Args { } ) } fn resolve ( & mut self , r#interface : String ) -> varlink :: MethodCall < Resolve_Args , Resolve_Reply , Error > { varlink :: MethodCall :: < Resolve_Args , Resolve_Reply , Error > :: new ( self . connection . clone ( ) , "org.varlink.resolver.Resolve" , Resolve_Args { r#interface } ) } } # [ allow ( dead_code ) ] pub struct VarlinkInterfaceProxy { inner : Box < VarlinkInterface + Send + Sync > , } # [ allow ( dead_code ) ] pub fn new ( inner : Box < VarlinkInterface + Send + Sync > ) -> VarlinkInterfaceProxy { VarlinkInterfaceProxy { inner } } impl varlink :: Interface for VarlinkInterfaceProxy { fn get_description ( & self ) -> & 'static str { "# Interface to resolve reverse-domain interface names to\n# service adresses\ninterface org.varlink.resolver\n\n# Get a list of all resolvable interfaces and information\n# about the resolver's identity.\nmethod GetInfo() -> (\n vendor: string,\n product: string,\n version: string,\n url: string,\n interfaces: []string\n)\n\n# Resolve an interface name to a registered varlink service address\nmethod Resolve(interface: string) -> (address: string)\n\nerror InterfaceNotFound (interface: string)\n" } fn get_name ( & self ) -> & 'static str { "org.varlink.resolver" } fn call_upgraded ( & self , call : & mut varlink :: Call , bufreader : & mut BufRead ) -> varlink :: Result < Vec < u8 >> { self . inner . call_upgraded ( call , bufreader ) } fn call ( & self , call : & mut varlink :: Call ) -> varlink :: Result < ( ) > { let req = call . request . unwrap ( ) ; match req . method . as_ref ( ) { "org.varlink.resolver.GetInfo" => self . inner . get_info ( call as & mut Call_GetInfo ) , "org.varlink.resolver.Resolve" => { if let Some ( args ) = req . parameters . clone ( ) { let args : Resolve_Args = match serde_json :: from_value ( args ) { Ok ( v ) => v , Err ( e ) => { let es = format ! ( "{}" , e ) ; let _ = call . reply_invalid_parameter ( es . clone ( ) ) ; return Err ( into_cherr ! ( varlink :: ErrorKind :: SerdeJsonDe ( es ) ) ) ; } } ; self . inner . resolve ( call as & mut Call_Resolve , args . r#interface ) } else { call . reply_invalid_parameter ( "parameters" . into ( ) ) } } , m => { call . reply_method_not_found ( String :: from ( m ) ) } } } } [INFO] [stderr] | ^^^^^^^^^^^^ help: use `dyn`: `dyn Call_Resolve` [INFO] [stderr] [INFO] [stderr] warning: trait objects without an explicit `dyn` are deprecated [INFO] [stderr] --> /opt/crater/target/debug/build/varlink_stdinterfaces-54f76819d3207c73/out/org.varlink.resolver.rs:1:5274 [INFO] [stderr] | [INFO] [stderr] 1 | use chainerror :: * ; use serde_derive :: { { Deserialize , Serialize } } ; use serde_json ; use std :: io :: BufRead ; use std :: sync :: { { Arc , RwLock } } ; use varlink :: { { self , CallTrait } } ; # [ derive ( Serialize , Deserialize , Debug , PartialEq , Clone ) ] pub struct InterfaceNotFound_Args { pub r#interface : String , } pub trait VarlinkCallError : varlink :: CallTrait { fn reply_interface_not_found ( & mut self , r#interface : String ) -> varlink :: Result < ( ) > { self . reply_struct ( varlink :: Reply :: error ( "org.varlink.resolver.InterfaceNotFound" , Some ( serde_json :: to_value ( InterfaceNotFound_Args { r#interface } ) . map_err ( minto_cherr ! ( ) ) ? ) ) ) } } impl < 'a > VarlinkCallError for varlink :: Call < 'a > { } # [ allow ( dead_code ) ] # [ derive ( Clone , PartialEq , Debug ) ] pub enum ErrorKind { Io_Error ( :: std :: io :: ErrorKind ) , SerdeJson_Error ( serde_json :: error :: Category ) , Varlink_Error , VarlinkReply_Error ( varlink :: Reply ) , Generic , InterfaceNotFound ( Option < InterfaceNotFound_Args > ) } impl :: std :: fmt :: Display for ErrorKind { fn fmt ( & self , f : & mut :: std :: fmt :: Formatter ) -> :: std :: fmt :: Result { match self { ErrorKind :: Io_Error ( _ ) => write ! ( f , "IO error" ) , ErrorKind :: SerdeJson_Error ( _ ) => { write ! ( f , "(De)Serialization Error" ) } ErrorKind :: Varlink_Error => write ! ( f , "Varlink Error" ) , ErrorKind :: VarlinkReply_Error ( v ) => write ! ( f , "Unknown error reply: '{:#?}'" , v ) , ErrorKind :: Generic => Ok ( ( ) ) , ErrorKind :: InterfaceNotFound ( v ) => write ! ( f , "org.varlink.resolver.InterfaceNotFound: {:#?}" , v ) } } } impl :: std :: error :: Error for ErrorKind { } impl ChainErrorFrom < std :: io :: Error > for ErrorKind { fn chain_error_from ( e : std :: io :: Error , line_filename : Option < ( u32 , & 'static str ) > , ) -> ChainError < Self > { ChainError :: < _ > :: new ( ErrorKind :: Io_Error ( e . kind ( ) ) , Some ( Box :: from ( e ) ) , line_filename ) } } impl ChainErrorFrom < serde_json :: error :: Error > for ErrorKind { fn chain_error_from ( e : serde_json :: error :: Error , line_filename : Option < ( u32 , & 'static str ) > , ) -> ChainError < Self > { ChainError :: < _ > :: new ( ErrorKind :: SerdeJson_Error ( e . classify ( ) ) , Some ( Box :: from ( e ) ) , line_filename , ) } } impl ChainErrorFrom < varlink :: ErrorKind > for ErrorKind { fn chain_error_from ( e : varlink :: ErrorKind , line_filename : Option < ( u32 , & 'static str ) > , ) -> ChainError < Self > { ChainError :: < _ > :: new ( ErrorKind :: Varlink_Error , Some ( Box :: from ( ChainError :: < _ > :: new ( e , None , line_filename , ) ) ) , line_filename , ) } } # [ allow ( dead_code ) ] pub type Result < T > = ChainResult < T , ErrorKind > ; # [ allow ( dead_code ) ] pub type Error = ErrorKind ; impl ChainErrorFrom < varlink :: Reply > for ErrorKind { # [ allow ( unused_variables ) ] fn chain_error_from ( e : varlink :: Reply , line_filename : Option < ( u32 , & 'static str ) > ) -> ChainError < Self > { if varlink :: ErrorKind :: is_error ( & e ) { let e : varlink :: ErrorKind = e . into ( ) ; return into_cherr ! ( e ) ; } match e { varlink :: Reply { error : Some ( ref t ) , .. } if t == "org.varlink.resolver.InterfaceNotFound" => { match e { varlink :: Reply { parameters : Some ( p ) , .. } => match serde_json :: from_value ( p ) { Ok ( v ) => into_cherr ! ( ErrorKind :: InterfaceNotFound ( v ) ) , Err ( _ ) => into_cherr ! ( ErrorKind :: InterfaceNotFound ( None ) ) , } , _ => into_cherr ! ( ErrorKind :: InterfaceNotFound ( None ) ) , } } _ => into_cherr ! ( ErrorKind :: VarlinkReply_Error ( e ) ) , } } } # [ derive ( Serialize , Deserialize , Debug , PartialEq , Clone ) ] pub struct GetInfo_Reply { pub r#vendor : String , pub r#product : String , pub r#version : String , pub r#url : String , pub r#interfaces : Vec < String > , } impl varlink :: VarlinkReply for GetInfo_Reply { } # [ derive ( Serialize , Deserialize , Debug , PartialEq , Clone ) ] pub struct GetInfo_Args { } pub trait Call_GetInfo : VarlinkCallError { fn reply ( & mut self , r#vendor : String , r#product : String , r#version : String , r#url : String , r#interfaces : Vec < String > ) -> varlink :: Result < ( ) > { self . reply_struct ( GetInfo_Reply { r#vendor , r#product , r#version , r#url , r#interfaces } . into ( ) ) } } impl < 'a > Call_GetInfo for varlink :: Call < 'a > { } # [ derive ( Serialize , Deserialize , Debug , PartialEq , Clone ) ] pub struct Resolve_Reply { pub r#address : String , } impl varlink :: VarlinkReply for Resolve_Reply { } # [ derive ( Serialize , Deserialize , Debug , PartialEq , Clone ) ] pub struct Resolve_Args { pub r#interface : String , } pub trait Call_Resolve : VarlinkCallError { fn reply ( & mut self , r#address : String ) -> varlink :: Result < ( ) > { self . reply_struct ( Resolve_Reply { r#address } . into ( ) ) } } impl < 'a > Call_Resolve for varlink :: Call < 'a > { } pub trait VarlinkInterface { fn get_info ( & self , call : & mut Call_GetInfo , ) -> varlink :: Result < ( ) > ; fn resolve ( & self , call : & mut Call_Resolve , r#interface : String ) -> varlink :: Result < ( ) > ; fn call_upgraded ( & self , _call : & mut varlink :: Call , _bufreader : & mut BufRead ) -> varlink :: Result < Vec < u8 >> { Ok ( Vec :: new ( ) ) } } pub trait VarlinkClientInterface { fn get_info ( & mut self , ) -> varlink :: MethodCall < GetInfo_Args , GetInfo_Reply , Error > ; fn resolve ( & mut self , r#interface : String ) -> varlink :: MethodCall < Resolve_Args , Resolve_Reply , Error > ; } # [ allow ( dead_code ) ] pub struct VarlinkClient { connection : Arc < RwLock < varlink :: Connection >> , } impl VarlinkClient { # [ allow ( dead_code ) ] pub fn new ( connection : Arc < RwLock < varlink :: Connection >> ) -> Self { VarlinkClient { connection , } } } impl VarlinkClientInterface for VarlinkClient { fn get_info ( & mut self , ) -> varlink :: MethodCall < GetInfo_Args , GetInfo_Reply , Error > { varlink :: MethodCall :: < GetInfo_Args , GetInfo_Reply , Error > :: new ( self . connection . clone ( ) , "org.varlink.resolver.GetInfo" , GetInfo_Args { } ) } fn resolve ( & mut self , r#interface : String ) -> varlink :: MethodCall < Resolve_Args , Resolve_Reply , Error > { varlink :: MethodCall :: < Resolve_Args , Resolve_Reply , Error > :: new ( self . connection . clone ( ) , "org.varlink.resolver.Resolve" , Resolve_Args { r#interface } ) } } # [ allow ( dead_code ) ] pub struct VarlinkInterfaceProxy { inner : Box < VarlinkInterface + Send + Sync > , } # [ allow ( dead_code ) ] pub fn new ( inner : Box < VarlinkInterface + Send + Sync > ) -> VarlinkInterfaceProxy { VarlinkInterfaceProxy { inner } } impl varlink :: Interface for VarlinkInterfaceProxy { fn get_description ( & self ) -> & 'static str { "# Interface to resolve reverse-domain interface names to\n# service adresses\ninterface org.varlink.resolver\n\n# Get a list of all resolvable interfaces and information\n# about the resolver's identity.\nmethod GetInfo() -> (\n vendor: string,\n product: string,\n version: string,\n url: string,\n interfaces: []string\n)\n\n# Resolve an interface name to a registered varlink service address\nmethod Resolve(interface: string) -> (address: string)\n\nerror InterfaceNotFound (interface: string)\n" } fn get_name ( & self ) -> & 'static str { "org.varlink.resolver" } fn call_upgraded ( & self , call : & mut varlink :: Call , bufreader : & mut BufRead ) -> varlink :: Result < Vec < u8 >> { self . inner . call_upgraded ( call , bufreader ) } fn call ( & self , call : & mut varlink :: Call ) -> varlink :: Result < ( ) > { let req = call . request . unwrap ( ) ; match req . method . as_ref ( ) { "org.varlink.resolver.GetInfo" => self . inner . get_info ( call as & mut Call_GetInfo ) , "org.varlink.resolver.Resolve" => { if let Some ( args ) = req . parameters . clone ( ) { let args : Resolve_Args = match serde_json :: from_value ( args ) { Ok ( v ) => v , Err ( e ) => { let es = format ! ( "{}" , e ) ; let _ = call . reply_invalid_parameter ( es . clone ( ) ) ; return Err ( into_cherr ! ( varlink :: ErrorKind :: SerdeJsonDe ( es ) ) ) ; } } ; self . inner . resolve ( call as & mut Call_Resolve , args . r#interface ) } else { call . reply_invalid_parameter ( "parameters" . into ( ) ) } } , m => { call . reply_method_not_found ( String :: from ( m ) ) } } } } [INFO] [stderr] | ^^^^^^^ help: use `dyn`: `dyn BufRead` [INFO] [stderr] [INFO] [stderr] warning: trait objects without an explicit `dyn` are deprecated [INFO] [stderr] --> /opt/crater/target/debug/build/varlink_stdinterfaces-54f76819d3207c73/out/org.varlink.resolver.rs:1:6541 [INFO] [stderr] | [INFO] [stderr] 1 | use chainerror :: * ; use serde_derive :: { { Deserialize , Serialize } } ; use serde_json ; use std :: io :: BufRead ; use std :: sync :: { { Arc , RwLock } } ; use varlink :: { { self , CallTrait } } ; # [ derive ( Serialize , Deserialize , Debug , PartialEq , Clone ) ] pub struct InterfaceNotFound_Args { pub r#interface : String , } pub trait VarlinkCallError : varlink :: CallTrait { fn reply_interface_not_found ( & mut self , r#interface : String ) -> varlink :: Result < ( ) > { self . reply_struct ( varlink :: Reply :: error ( "org.varlink.resolver.InterfaceNotFound" , Some ( serde_json :: to_value ( InterfaceNotFound_Args { r#interface } ) . map_err ( minto_cherr ! ( ) ) ? ) ) ) } } impl < 'a > VarlinkCallError for varlink :: Call < 'a > { } # [ allow ( dead_code ) ] # [ derive ( Clone , PartialEq , Debug ) ] pub enum ErrorKind { Io_Error ( :: std :: io :: ErrorKind ) , SerdeJson_Error ( serde_json :: error :: Category ) , Varlink_Error , VarlinkReply_Error ( varlink :: Reply ) , Generic , InterfaceNotFound ( Option < InterfaceNotFound_Args > ) } impl :: std :: fmt :: Display for ErrorKind { fn fmt ( & self , f : & mut :: std :: fmt :: Formatter ) -> :: std :: fmt :: Result { match self { ErrorKind :: Io_Error ( _ ) => write ! ( f , "IO error" ) , ErrorKind :: SerdeJson_Error ( _ ) => { write ! ( f , "(De)Serialization Error" ) } ErrorKind :: Varlink_Error => write ! ( f , "Varlink Error" ) , ErrorKind :: VarlinkReply_Error ( v ) => write ! ( f , "Unknown error reply: '{:#?}'" , v ) , ErrorKind :: Generic => Ok ( ( ) ) , ErrorKind :: InterfaceNotFound ( v ) => write ! ( f , "org.varlink.resolver.InterfaceNotFound: {:#?}" , v ) } } } impl :: std :: error :: Error for ErrorKind { } impl ChainErrorFrom < std :: io :: Error > for ErrorKind { fn chain_error_from ( e : std :: io :: Error , line_filename : Option < ( u32 , & 'static str ) > , ) -> ChainError < Self > { ChainError :: < _ > :: new ( ErrorKind :: Io_Error ( e . kind ( ) ) , Some ( Box :: from ( e ) ) , line_filename ) } } impl ChainErrorFrom < serde_json :: error :: Error > for ErrorKind { fn chain_error_from ( e : serde_json :: error :: Error , line_filename : Option < ( u32 , & 'static str ) > , ) -> ChainError < Self > { ChainError :: < _ > :: new ( ErrorKind :: SerdeJson_Error ( e . classify ( ) ) , Some ( Box :: from ( e ) ) , line_filename , ) } } impl ChainErrorFrom < varlink :: ErrorKind > for ErrorKind { fn chain_error_from ( e : varlink :: ErrorKind , line_filename : Option < ( u32 , & 'static str ) > , ) -> ChainError < Self > { ChainError :: < _ > :: new ( ErrorKind :: Varlink_Error , Some ( Box :: from ( ChainError :: < _ > :: new ( e , None , line_filename , ) ) ) , line_filename , ) } } # [ allow ( dead_code ) ] pub type Result < T > = ChainResult < T , ErrorKind > ; # [ allow ( dead_code ) ] pub type Error = ErrorKind ; impl ChainErrorFrom < varlink :: Reply > for ErrorKind { # [ allow ( unused_variables ) ] fn chain_error_from ( e : varlink :: Reply , line_filename : Option < ( u32 , & 'static str ) > ) -> ChainError < Self > { if varlink :: ErrorKind :: is_error ( & e ) { let e : varlink :: ErrorKind = e . into ( ) ; return into_cherr ! ( e ) ; } match e { varlink :: Reply { error : Some ( ref t ) , .. } if t == "org.varlink.resolver.InterfaceNotFound" => { match e { varlink :: Reply { parameters : Some ( p ) , .. } => match serde_json :: from_value ( p ) { Ok ( v ) => into_cherr ! ( ErrorKind :: InterfaceNotFound ( v ) ) , Err ( _ ) => into_cherr ! ( ErrorKind :: InterfaceNotFound ( None ) ) , } , _ => into_cherr ! ( ErrorKind :: InterfaceNotFound ( None ) ) , } } _ => into_cherr ! ( ErrorKind :: VarlinkReply_Error ( e ) ) , } } } # [ derive ( Serialize , Deserialize , Debug , PartialEq , Clone ) ] pub struct GetInfo_Reply { pub r#vendor : String , pub r#product : String , pub r#version : String , pub r#url : String , pub r#interfaces : Vec < String > , } impl varlink :: VarlinkReply for GetInfo_Reply { } # [ derive ( Serialize , Deserialize , Debug , PartialEq , Clone ) ] pub struct GetInfo_Args { } pub trait Call_GetInfo : VarlinkCallError { fn reply ( & mut self , r#vendor : String , r#product : String , r#version : String , r#url : String , r#interfaces : Vec < String > ) -> varlink :: Result < ( ) > { self . reply_struct ( GetInfo_Reply { r#vendor , r#product , r#version , r#url , r#interfaces } . into ( ) ) } } impl < 'a > Call_GetInfo for varlink :: Call < 'a > { } # [ derive ( Serialize , Deserialize , Debug , PartialEq , Clone ) ] pub struct Resolve_Reply { pub r#address : String , } impl varlink :: VarlinkReply for Resolve_Reply { } # [ derive ( Serialize , Deserialize , Debug , PartialEq , Clone ) ] pub struct Resolve_Args { pub r#interface : String , } pub trait Call_Resolve : VarlinkCallError { fn reply ( & mut self , r#address : String ) -> varlink :: Result < ( ) > { self . reply_struct ( Resolve_Reply { r#address } . into ( ) ) } } impl < 'a > Call_Resolve for varlink :: Call < 'a > { } pub trait VarlinkInterface { fn get_info ( & self , call : & mut Call_GetInfo , ) -> varlink :: Result < ( ) > ; fn resolve ( & self , call : & mut Call_Resolve , r#interface : String ) -> varlink :: Result < ( ) > ; fn call_upgraded ( & self , _call : & mut varlink :: Call , _bufreader : & mut BufRead ) -> varlink :: Result < Vec < u8 >> { Ok ( Vec :: new ( ) ) } } pub trait VarlinkClientInterface { fn get_info ( & mut self , ) -> varlink :: MethodCall < GetInfo_Args , GetInfo_Reply , Error > ; fn resolve ( & mut self , r#interface : String ) -> varlink :: MethodCall < Resolve_Args , Resolve_Reply , Error > ; } # [ allow ( dead_code ) ] pub struct VarlinkClient { connection : Arc < RwLock < varlink :: Connection >> , } impl VarlinkClient { # [ allow ( dead_code ) ] pub fn new ( connection : Arc < RwLock < varlink :: Connection >> ) -> Self { VarlinkClient { connection , } } } impl VarlinkClientInterface for VarlinkClient { fn get_info ( & mut self , ) -> varlink :: MethodCall < GetInfo_Args , GetInfo_Reply , Error > { varlink :: MethodCall :: < GetInfo_Args , GetInfo_Reply , Error > :: new ( self . connection . clone ( ) , "org.varlink.resolver.GetInfo" , GetInfo_Args { } ) } fn resolve ( & mut self , r#interface : String ) -> varlink :: MethodCall < Resolve_Args , Resolve_Reply , Error > { varlink :: MethodCall :: < Resolve_Args , Resolve_Reply , Error > :: new ( self . connection . clone ( ) , "org.varlink.resolver.Resolve" , Resolve_Args { r#interface } ) } } # [ allow ( dead_code ) ] pub struct VarlinkInterfaceProxy { inner : Box < VarlinkInterface + Send + Sync > , } # [ allow ( dead_code ) ] pub fn new ( inner : Box < VarlinkInterface + Send + Sync > ) -> VarlinkInterfaceProxy { VarlinkInterfaceProxy { inner } } impl varlink :: Interface for VarlinkInterfaceProxy { fn get_description ( & self ) -> & 'static str { "# Interface to resolve reverse-domain interface names to\n# service adresses\ninterface org.varlink.resolver\n\n# Get a list of all resolvable interfaces and information\n# about the resolver's identity.\nmethod GetInfo() -> (\n vendor: string,\n product: string,\n version: string,\n url: string,\n interfaces: []string\n)\n\n# Resolve an interface name to a registered varlink service address\nmethod Resolve(interface: string) -> (address: string)\n\nerror InterfaceNotFound (interface: string)\n" } fn get_name ( & self ) -> & 'static str { "org.varlink.resolver" } fn call_upgraded ( & self , call : & mut varlink :: Call , bufreader : & mut BufRead ) -> varlink :: Result < Vec < u8 >> { self . inner . call_upgraded ( call , bufreader ) } fn call ( & self , call : & mut varlink :: Call ) -> varlink :: Result < ( ) > { let req = call . request . unwrap ( ) ; match req . method . as_ref ( ) { "org.varlink.resolver.GetInfo" => self . inner . get_info ( call as & mut Call_GetInfo ) , "org.varlink.resolver.Resolve" => { if let Some ( args ) = req . parameters . clone ( ) { let args : Resolve_Args = match serde_json :: from_value ( args ) { Ok ( v ) => v , Err ( e ) => { let es = format ! ( "{}" , e ) ; let _ = call . reply_invalid_parameter ( es . clone ( ) ) ; return Err ( into_cherr ! ( varlink :: ErrorKind :: SerdeJsonDe ( es ) ) ) ; } } ; self . inner . resolve ( call as & mut Call_Resolve , args . r#interface ) } else { call . reply_invalid_parameter ( "parameters" . into ( ) ) } } , m => { call . reply_method_not_found ( String :: from ( m ) ) } } } } [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `dyn`: `dyn VarlinkInterface + Send + Sync` [INFO] [stderr] [INFO] [stderr] warning: trait objects without an explicit `dyn` are deprecated [INFO] [stderr] --> /opt/crater/target/debug/build/varlink_stdinterfaces-54f76819d3207c73/out/org.varlink.resolver.rs:1:6631 [INFO] [stderr] | [INFO] [stderr] 1 | use chainerror :: * ; use serde_derive :: { { Deserialize , Serialize } } ; use serde_json ; use std :: io :: BufRead ; use std :: sync :: { { Arc , RwLock } } ; use varlink :: { { self , CallTrait } } ; # [ derive ( Serialize , Deserialize , Debug , PartialEq , Clone ) ] pub struct InterfaceNotFound_Args { pub r#interface : String , } pub trait VarlinkCallError : varlink :: CallTrait { fn reply_interface_not_found ( & mut self , r#interface : String ) -> varlink :: Result < ( ) > { self . reply_struct ( varlink :: Reply :: error ( "org.varlink.resolver.InterfaceNotFound" , Some ( serde_json :: to_value ( InterfaceNotFound_Args { r#interface } ) . map_err ( minto_cherr ! ( ) ) ? ) ) ) } } impl < 'a > VarlinkCallError for varlink :: Call < 'a > { } # [ allow ( dead_code ) ] # [ derive ( Clone , PartialEq , Debug ) ] pub enum ErrorKind { Io_Error ( :: std :: io :: ErrorKind ) , SerdeJson_Error ( serde_json :: error :: Category ) , Varlink_Error , VarlinkReply_Error ( varlink :: Reply ) , Generic , InterfaceNotFound ( Option < InterfaceNotFound_Args > ) } impl :: std :: fmt :: Display for ErrorKind { fn fmt ( & self , f : & mut :: std :: fmt :: Formatter ) -> :: std :: fmt :: Result { match self { ErrorKind :: Io_Error ( _ ) => write ! ( f , "IO error" ) , ErrorKind :: SerdeJson_Error ( _ ) => { write ! ( f , "(De)Serialization Error" ) } ErrorKind :: Varlink_Error => write ! ( f , "Varlink Error" ) , ErrorKind :: VarlinkReply_Error ( v ) => write ! ( f , "Unknown error reply: '{:#?}'" , v ) , ErrorKind :: Generic => Ok ( ( ) ) , ErrorKind :: InterfaceNotFound ( v ) => write ! ( f , "org.varlink.resolver.InterfaceNotFound: {:#?}" , v ) } } } impl :: std :: error :: Error for ErrorKind { } impl ChainErrorFrom < std :: io :: Error > for ErrorKind { fn chain_error_from ( e : std :: io :: Error , line_filename : Option < ( u32 , & 'static str ) > , ) -> ChainError < Self > { ChainError :: < _ > :: new ( ErrorKind :: Io_Error ( e . kind ( ) ) , Some ( Box :: from ( e ) ) , line_filename ) } } impl ChainErrorFrom < serde_json :: error :: Error > for ErrorKind { fn chain_error_from ( e : serde_json :: error :: Error , line_filename : Option < ( u32 , & 'static str ) > , ) -> ChainError < Self > { ChainError :: < _ > :: new ( ErrorKind :: SerdeJson_Error ( e . classify ( ) ) , Some ( Box :: from ( e ) ) , line_filename , ) } } impl ChainErrorFrom < varlink :: ErrorKind > for ErrorKind { fn chain_error_from ( e : varlink :: ErrorKind , line_filename : Option < ( u32 , & 'static str ) > , ) -> ChainError < Self > { ChainError :: < _ > :: new ( ErrorKind :: Varlink_Error , Some ( Box :: from ( ChainError :: < _ > :: new ( e , None , line_filename , ) ) ) , line_filename , ) } } # [ allow ( dead_code ) ] pub type Result < T > = ChainResult < T , ErrorKind > ; # [ allow ( dead_code ) ] pub type Error = ErrorKind ; impl ChainErrorFrom < varlink :: Reply > for ErrorKind { # [ allow ( unused_variables ) ] fn chain_error_from ( e : varlink :: Reply , line_filename : Option < ( u32 , & 'static str ) > ) -> ChainError < Self > { if varlink :: ErrorKind :: is_error ( & e ) { let e : varlink :: ErrorKind = e . into ( ) ; return into_cherr ! ( e ) ; } match e { varlink :: Reply { error : Some ( ref t ) , .. } if t == "org.varlink.resolver.InterfaceNotFound" => { match e { varlink :: Reply { parameters : Some ( p ) , .. } => match serde_json :: from_value ( p ) { Ok ( v ) => into_cherr ! ( ErrorKind :: InterfaceNotFound ( v ) ) , Err ( _ ) => into_cherr ! ( ErrorKind :: InterfaceNotFound ( None ) ) , } , _ => into_cherr ! ( ErrorKind :: InterfaceNotFound ( None ) ) , } } _ => into_cherr ! ( ErrorKind :: VarlinkReply_Error ( e ) ) , } } } # [ derive ( Serialize , Deserialize , Debug , PartialEq , Clone ) ] pub struct GetInfo_Reply { pub r#vendor : String , pub r#product : String , pub r#version : String , pub r#url : String , pub r#interfaces : Vec < String > , } impl varlink :: VarlinkReply for GetInfo_Reply { } # [ derive ( Serialize , Deserialize , Debug , PartialEq , Clone ) ] pub struct GetInfo_Args { } pub trait Call_GetInfo : VarlinkCallError { fn reply ( & mut self , r#vendor : String , r#product : String , r#version : String , r#url : String , r#interfaces : Vec < String > ) -> varlink :: Result < ( ) > { self . reply_struct ( GetInfo_Reply { r#vendor , r#product , r#version , r#url , r#interfaces } . into ( ) ) } } impl < 'a > Call_GetInfo for varlink :: Call < 'a > { } # [ derive ( Serialize , Deserialize , Debug , PartialEq , Clone ) ] pub struct Resolve_Reply { pub r#address : String , } impl varlink :: VarlinkReply for Resolve_Reply { } # [ derive ( Serialize , Deserialize , Debug , PartialEq , Clone ) ] pub struct Resolve_Args { pub r#interface : String , } pub trait Call_Resolve : VarlinkCallError { fn reply ( & mut self , r#address : String ) -> varlink :: Result < ( ) > { self . reply_struct ( Resolve_Reply { r#address } . into ( ) ) } } impl < 'a > Call_Resolve for varlink :: Call < 'a > { } pub trait VarlinkInterface { fn get_info ( & self , call : & mut Call_GetInfo , ) -> varlink :: Result < ( ) > ; fn resolve ( & self , call : & mut Call_Resolve , r#interface : String ) -> varlink :: Result < ( ) > ; fn call_upgraded ( & self , _call : & mut varlink :: Call , _bufreader : & mut BufRead ) -> varlink :: Result < Vec < u8 >> { Ok ( Vec :: new ( ) ) } } pub trait VarlinkClientInterface { fn get_info ( & mut self , ) -> varlink :: MethodCall < GetInfo_Args , GetInfo_Reply , Error > ; fn resolve ( & mut self , r#interface : String ) -> varlink :: MethodCall < Resolve_Args , Resolve_Reply , Error > ; } # [ allow ( dead_code ) ] pub struct VarlinkClient { connection : Arc < RwLock < varlink :: Connection >> , } impl VarlinkClient { # [ allow ( dead_code ) ] pub fn new ( connection : Arc < RwLock < varlink :: Connection >> ) -> Self { VarlinkClient { connection , } } } impl VarlinkClientInterface for VarlinkClient { fn get_info ( & mut self , ) -> varlink :: MethodCall < GetInfo_Args , GetInfo_Reply , Error > { varlink :: MethodCall :: < GetInfo_Args , GetInfo_Reply , Error > :: new ( self . connection . clone ( ) , "org.varlink.resolver.GetInfo" , GetInfo_Args { } ) } fn resolve ( & mut self , r#interface : String ) -> varlink :: MethodCall < Resolve_Args , Resolve_Reply , Error > { varlink :: MethodCall :: < Resolve_Args , Resolve_Reply , Error > :: new ( self . connection . clone ( ) , "org.varlink.resolver.Resolve" , Resolve_Args { r#interface } ) } } # [ allow ( dead_code ) ] pub struct VarlinkInterfaceProxy { inner : Box < VarlinkInterface + Send + Sync > , } # [ allow ( dead_code ) ] pub fn new ( inner : Box < VarlinkInterface + Send + Sync > ) -> VarlinkInterfaceProxy { VarlinkInterfaceProxy { inner } } impl varlink :: Interface for VarlinkInterfaceProxy { fn get_description ( & self ) -> & 'static str { "# Interface to resolve reverse-domain interface names to\n# service adresses\ninterface org.varlink.resolver\n\n# Get a list of all resolvable interfaces and information\n# about the resolver's identity.\nmethod GetInfo() -> (\n vendor: string,\n product: string,\n version: string,\n url: string,\n interfaces: []string\n)\n\n# Resolve an interface name to a registered varlink service address\nmethod Resolve(interface: string) -> (address: string)\n\nerror InterfaceNotFound (interface: string)\n" } fn get_name ( & self ) -> & 'static str { "org.varlink.resolver" } fn call_upgraded ( & self , call : & mut varlink :: Call , bufreader : & mut BufRead ) -> varlink :: Result < Vec < u8 >> { self . inner . call_upgraded ( call , bufreader ) } fn call ( & self , call : & mut varlink :: Call ) -> varlink :: Result < ( ) > { let req = call . request . unwrap ( ) ; match req . method . as_ref ( ) { "org.varlink.resolver.GetInfo" => self . inner . get_info ( call as & mut Call_GetInfo ) , "org.varlink.resolver.Resolve" => { if let Some ( args ) = req . parameters . clone ( ) { let args : Resolve_Args = match serde_json :: from_value ( args ) { Ok ( v ) => v , Err ( e ) => { let es = format ! ( "{}" , e ) ; let _ = call . reply_invalid_parameter ( es . clone ( ) ) ; return Err ( into_cherr ! ( varlink :: ErrorKind :: SerdeJsonDe ( es ) ) ) ; } } ; self . inner . resolve ( call as & mut Call_Resolve , args . r#interface ) } else { call . reply_invalid_parameter ( "parameters" . into ( ) ) } } , m => { call . reply_method_not_found ( String :: from ( m ) ) } } } } [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `dyn`: `dyn VarlinkInterface + Send + Sync` [INFO] [stderr] [INFO] [stderr] warning: trait objects without an explicit `dyn` are deprecated [INFO] [stderr] --> /opt/crater/target/debug/build/varlink_stdinterfaces-54f76819d3207c73/out/org.varlink.resolver.rs:1:7483 [INFO] [stderr] | [INFO] [stderr] 1 | use chainerror :: * ; use serde_derive :: { { Deserialize , Serialize } } ; use serde_json ; use std :: io :: BufRead ; use std :: sync :: { { Arc , RwLock } } ; use varlink :: { { self , CallTrait } } ; # [ derive ( Serialize , Deserialize , Debug , PartialEq , Clone ) ] pub struct InterfaceNotFound_Args { pub r#interface : String , } pub trait VarlinkCallError : varlink :: CallTrait { fn reply_interface_not_found ( & mut self , r#interface : String ) -> varlink :: Result < ( ) > { self . reply_struct ( varlink :: Reply :: error ( "org.varlink.resolver.InterfaceNotFound" , Some ( serde_json :: to_value ( InterfaceNotFound_Args { r#interface } ) . map_err ( minto_cherr ! ( ) ) ? ) ) ) } } impl < 'a > VarlinkCallError for varlink :: Call < 'a > { } # [ allow ( dead_code ) ] # [ derive ( Clone , PartialEq , Debug ) ] pub enum ErrorKind { Io_Error ( :: std :: io :: ErrorKind ) , SerdeJson_Error ( serde_json :: error :: Category ) , Varlink_Error , VarlinkReply_Error ( varlink :: Reply ) , Generic , InterfaceNotFound ( Option < InterfaceNotFound_Args > ) } impl :: std :: fmt :: Display for ErrorKind { fn fmt ( & self , f : & mut :: std :: fmt :: Formatter ) -> :: std :: fmt :: Result { match self { ErrorKind :: Io_Error ( _ ) => write ! ( f , "IO error" ) , ErrorKind :: SerdeJson_Error ( _ ) => { write ! ( f , "(De)Serialization Error" ) } ErrorKind :: Varlink_Error => write ! ( f , "Varlink Error" ) , ErrorKind :: VarlinkReply_Error ( v ) => write ! ( f , "Unknown error reply: '{:#?}'" , v ) , ErrorKind :: Generic => Ok ( ( ) ) , ErrorKind :: InterfaceNotFound ( v ) => write ! ( f , "org.varlink.resolver.InterfaceNotFound: {:#?}" , v ) } } } impl :: std :: error :: Error for ErrorKind { } impl ChainErrorFrom < std :: io :: Error > for ErrorKind { fn chain_error_from ( e : std :: io :: Error , line_filename : Option < ( u32 , & 'static str ) > , ) -> ChainError < Self > { ChainError :: < _ > :: new ( ErrorKind :: Io_Error ( e . kind ( ) ) , Some ( Box :: from ( e ) ) , line_filename ) } } impl ChainErrorFrom < serde_json :: error :: Error > for ErrorKind { fn chain_error_from ( e : serde_json :: error :: Error , line_filename : Option < ( u32 , & 'static str ) > , ) -> ChainError < Self > { ChainError :: < _ > :: new ( ErrorKind :: SerdeJson_Error ( e . classify ( ) ) , Some ( Box :: from ( e ) ) , line_filename , ) } } impl ChainErrorFrom < varlink :: ErrorKind > for ErrorKind { fn chain_error_from ( e : varlink :: ErrorKind , line_filename : Option < ( u32 , & 'static str ) > , ) -> ChainError < Self > { ChainError :: < _ > :: new ( ErrorKind :: Varlink_Error , Some ( Box :: from ( ChainError :: < _ > :: new ( e , None , line_filename , ) ) ) , line_filename , ) } } # [ allow ( dead_code ) ] pub type Result < T > = ChainResult < T , ErrorKind > ; # [ allow ( dead_code ) ] pub type Error = ErrorKind ; impl ChainErrorFrom < varlink :: Reply > for ErrorKind { # [ allow ( unused_variables ) ] fn chain_error_from ( e : varlink :: Reply , line_filename : Option < ( u32 , & 'static str ) > ) -> ChainError < Self > { if varlink :: ErrorKind :: is_error ( & e ) { let e : varlink :: ErrorKind = e . into ( ) ; return into_cherr ! ( e ) ; } match e { varlink :: Reply { error : Some ( ref t ) , .. } if t == "org.varlink.resolver.InterfaceNotFound" => { match e { varlink :: Reply { parameters : Some ( p ) , .. } => match serde_json :: from_value ( p ) { Ok ( v ) => into_cherr ! ( ErrorKind :: InterfaceNotFound ( v ) ) , Err ( _ ) => into_cherr ! ( ErrorKind :: InterfaceNotFound ( None ) ) , } , _ => into_cherr ! ( ErrorKind :: InterfaceNotFound ( None ) ) , } } _ => into_cherr ! ( ErrorKind :: VarlinkReply_Error ( e ) ) , } } } # [ derive ( Serialize , Deserialize , Debug , PartialEq , Clone ) ] pub struct GetInfo_Reply { pub r#vendor : String , pub r#product : String , pub r#version : String , pub r#url : String , pub r#interfaces : Vec < String > , } impl varlink :: VarlinkReply for GetInfo_Reply { } # [ derive ( Serialize , Deserialize , Debug , PartialEq , Clone ) ] pub struct GetInfo_Args { } pub trait Call_GetInfo : VarlinkCallError { fn reply ( & mut self , r#vendor : String , r#product : String , r#version : String , r#url : String , r#interfaces : Vec < String > ) -> varlink :: Result < ( ) > { self . reply_struct ( GetInfo_Reply { r#vendor , r#product , r#version , r#url , r#interfaces } . into ( ) ) } } impl < 'a > Call_GetInfo for varlink :: Call < 'a > { } # [ derive ( Serialize , Deserialize , Debug , PartialEq , Clone ) ] pub struct Resolve_Reply { pub r#address : String , } impl varlink :: VarlinkReply for Resolve_Reply { } # [ derive ( Serialize , Deserialize , Debug , PartialEq , Clone ) ] pub struct Resolve_Args { pub r#interface : String , } pub trait Call_Resolve : VarlinkCallError { fn reply ( & mut self , r#address : String ) -> varlink :: Result < ( ) > { self . reply_struct ( Resolve_Reply { r#address } . into ( ) ) } } impl < 'a > Call_Resolve for varlink :: Call < 'a > { } pub trait VarlinkInterface { fn get_info ( & self , call : & mut Call_GetInfo , ) -> varlink :: Result < ( ) > ; fn resolve ( & self , call : & mut Call_Resolve , r#interface : String ) -> varlink :: Result < ( ) > ; fn call_upgraded ( & self , _call : & mut varlink :: Call , _bufreader : & mut BufRead ) -> varlink :: Result < Vec < u8 >> { Ok ( Vec :: new ( ) ) } } pub trait VarlinkClientInterface { fn get_info ( & mut self , ) -> varlink :: MethodCall < GetInfo_Args , GetInfo_Reply , Error > ; fn resolve ( & mut self , r#interface : String ) -> varlink :: MethodCall < Resolve_Args , Resolve_Reply , Error > ; } # [ allow ( dead_code ) ] pub struct VarlinkClient { connection : Arc < RwLock < varlink :: Connection >> , } impl VarlinkClient { # [ allow ( dead_code ) ] pub fn new ( connection : Arc < RwLock < varlink :: Connection >> ) -> Self { VarlinkClient { connection , } } } impl VarlinkClientInterface for VarlinkClient { fn get_info ( & mut self , ) -> varlink :: MethodCall < GetInfo_Args , GetInfo_Reply , Error > { varlink :: MethodCall :: < GetInfo_Args , GetInfo_Reply , Error > :: new ( self . connection . clone ( ) , "org.varlink.resolver.GetInfo" , GetInfo_Args { } ) } fn resolve ( & mut self , r#interface : String ) -> varlink :: MethodCall < Resolve_Args , Resolve_Reply , Error > { varlink :: MethodCall :: < Resolve_Args , Resolve_Reply , Error > :: new ( self . connection . clone ( ) , "org.varlink.resolver.Resolve" , Resolve_Args { r#interface } ) } } # [ allow ( dead_code ) ] pub struct VarlinkInterfaceProxy { inner : Box < VarlinkInterface + Send + Sync > , } # [ allow ( dead_code ) ] pub fn new ( inner : Box < VarlinkInterface + Send + Sync > ) -> VarlinkInterfaceProxy { VarlinkInterfaceProxy { inner } } impl varlink :: Interface for VarlinkInterfaceProxy { fn get_description ( & self ) -> & 'static str { "# Interface to resolve reverse-domain interface names to\n# service adresses\ninterface org.varlink.resolver\n\n# Get a list of all resolvable interfaces and information\n# about the resolver's identity.\nmethod GetInfo() -> (\n vendor: string,\n product: string,\n version: string,\n url: string,\n interfaces: []string\n)\n\n# Resolve an interface name to a registered varlink service address\nmethod Resolve(interface: string) -> (address: string)\n\nerror InterfaceNotFound (interface: string)\n" } fn get_name ( & self ) -> & 'static str { "org.varlink.resolver" } fn call_upgraded ( & self , call : & mut varlink :: Call , bufreader : & mut BufRead ) -> varlink :: Result < Vec < u8 >> { self . inner . call_upgraded ( call , bufreader ) } fn call ( & self , call : & mut varlink :: Call ) -> varlink :: Result < ( ) > { let req = call . request . unwrap ( ) ; match req . method . as_ref ( ) { "org.varlink.resolver.GetInfo" => self . inner . get_info ( call as & mut Call_GetInfo ) , "org.varlink.resolver.Resolve" => { if let Some ( args ) = req . parameters . clone ( ) { let args : Resolve_Args = match serde_json :: from_value ( args ) { Ok ( v ) => v , Err ( e ) => { let es = format ! ( "{}" , e ) ; let _ = call . reply_invalid_parameter ( es . clone ( ) ) ; return Err ( into_cherr ! ( varlink :: ErrorKind :: SerdeJsonDe ( es ) ) ) ; } } ; self . inner . resolve ( call as & mut Call_Resolve , args . r#interface ) } else { call . reply_invalid_parameter ( "parameters" . into ( ) ) } } , m => { call . reply_method_not_found ( String :: from ( m ) ) } } } } [INFO] [stderr] | ^^^^^^^ help: use `dyn`: `dyn BufRead` [INFO] [stderr] [INFO] [stderr] warning: trait objects without an explicit `dyn` are deprecated [INFO] [stderr] --> /opt/crater/target/debug/build/varlink_stdinterfaces-54f76819d3207c73/out/org.varlink.resolver.rs:1:7811 [INFO] [stderr] | [INFO] [stderr] 1 | use chainerror :: * ; use serde_derive :: { { Deserialize , Serialize } } ; use serde_json ; use std :: io :: BufRead ; use std :: sync :: { { Arc , RwLock } } ; use varlink :: { { self , CallTrait } } ; # [ derive ( Serialize , Deserialize , Debug , PartialEq , Clone ) ] pub struct InterfaceNotFound_Args { pub r#interface : String , } pub trait VarlinkCallError : varlink :: CallTrait { fn reply_interface_not_found ( & mut self , r#interface : String ) -> varlink :: Result < ( ) > { self . reply_struct ( varlink :: Reply :: error ( "org.varlink.resolver.InterfaceNotFound" , Some ( serde_json :: to_value ( InterfaceNotFound_Args { r#interface } ) . map_err ( minto_cherr ! ( ) ) ? ) ) ) } } impl < 'a > VarlinkCallError for varlink :: Call < 'a > { } # [ allow ( dead_code ) ] # [ derive ( Clone , PartialEq , Debug ) ] pub enum ErrorKind { Io_Error ( :: std :: io :: ErrorKind ) , SerdeJson_Error ( serde_json :: error :: Category ) , Varlink_Error , VarlinkReply_Error ( varlink :: Reply ) , Generic , InterfaceNotFound ( Option < InterfaceNotFound_Args > ) } impl :: std :: fmt :: Display for ErrorKind { fn fmt ( & self , f : & mut :: std :: fmt :: Formatter ) -> :: std :: fmt :: Result { match self { ErrorKind :: Io_Error ( _ ) => write ! ( f , "IO error" ) , ErrorKind :: SerdeJson_Error ( _ ) => { write ! ( f , "(De)Serialization Error" ) } ErrorKind :: Varlink_Error => write ! ( f , "Varlink Error" ) , ErrorKind :: VarlinkReply_Error ( v ) => write ! ( f , "Unknown error reply: '{:#?}'" , v ) , ErrorKind :: Generic => Ok ( ( ) ) , ErrorKind :: InterfaceNotFound ( v ) => write ! ( f , "org.varlink.resolver.InterfaceNotFound: {:#?}" , v ) } } } impl :: std :: error :: Error for ErrorKind { } impl ChainErrorFrom < std :: io :: Error > for ErrorKind { fn chain_error_from ( e : std :: io :: Error , line_filename : Option < ( u32 , & 'static str ) > , ) -> ChainError < Self > { ChainError :: < _ > :: new ( ErrorKind :: Io_Error ( e . kind ( ) ) , Some ( Box :: from ( e ) ) , line_filename ) } } impl ChainErrorFrom < serde_json :: error :: Error > for ErrorKind { fn chain_error_from ( e : serde_json :: error :: Error , line_filename : Option < ( u32 , & 'static str ) > , ) -> ChainError < Self > { ChainError :: < _ > :: new ( ErrorKind :: SerdeJson_Error ( e . classify ( ) ) , Some ( Box :: from ( e ) ) , line_filename , ) } } impl ChainErrorFrom < varlink :: ErrorKind > for ErrorKind { fn chain_error_from ( e : varlink :: ErrorKind , line_filename : Option < ( u32 , & 'static str ) > , ) -> ChainError < Self > { ChainError :: < _ > :: new ( ErrorKind :: Varlink_Error , Some ( Box :: from ( ChainError :: < _ > :: new ( e , None , line_filename , ) ) ) , line_filename , ) } } # [ allow ( dead_code ) ] pub type Result < T > = ChainResult < T , ErrorKind > ; # [ allow ( dead_code ) ] pub type Error = ErrorKind ; impl ChainErrorFrom < varlink :: Reply > for ErrorKind { # [ allow ( unused_variables ) ] fn chain_error_from ( e : varlink :: Reply , line_filename : Option < ( u32 , & 'static str ) > ) -> ChainError < Self > { if varlink :: ErrorKind :: is_error ( & e ) { let e : varlink :: ErrorKind = e . into ( ) ; return into_cherr ! ( e ) ; } match e { varlink :: Reply { error : Some ( ref t ) , .. } if t == "org.varlink.resolver.InterfaceNotFound" => { match e { varlink :: Reply { parameters : Some ( p ) , .. } => match serde_json :: from_value ( p ) { Ok ( v ) => into_cherr ! ( ErrorKind :: InterfaceNotFound ( v ) ) , Err ( _ ) => into_cherr ! ( ErrorKind :: InterfaceNotFound ( None ) ) , } , _ => into_cherr ! ( ErrorKind :: InterfaceNotFound ( None ) ) , } } _ => into_cherr ! ( ErrorKind :: VarlinkReply_Error ( e ) ) , } } } # [ derive ( Serialize , Deserialize , Debug , PartialEq , Clone ) ] pub struct GetInfo_Reply { pub r#vendor : String , pub r#product : String , pub r#version : String , pub r#url : String , pub r#interfaces : Vec < String > , } impl varlink :: VarlinkReply for GetInfo_Reply { } # [ derive ( Serialize , Deserialize , Debug , PartialEq , Clone ) ] pub struct GetInfo_Args { } pub trait Call_GetInfo : VarlinkCallError { fn reply ( & mut self , r#vendor : String , r#product : String , r#version : String , r#url : String , r#interfaces : Vec < String > ) -> varlink :: Result < ( ) > { self . reply_struct ( GetInfo_Reply { r#vendor , r#product , r#version , r#url , r#interfaces } . into ( ) ) } } impl < 'a > Call_GetInfo for varlink :: Call < 'a > { } # [ derive ( Serialize , Deserialize , Debug , PartialEq , Clone ) ] pub struct Resolve_Reply { pub r#address : String , } impl varlink :: VarlinkReply for Resolve_Reply { } # [ derive ( Serialize , Deserialize , Debug , PartialEq , Clone ) ] pub struct Resolve_Args { pub r#interface : String , } pub trait Call_Resolve : VarlinkCallError { fn reply ( & mut self , r#address : String ) -> varlink :: Result < ( ) > { self . reply_struct ( Resolve_Reply { r#address } . into ( ) ) } } impl < 'a > Call_Resolve for varlink :: Call < 'a > { } pub trait VarlinkInterface { fn get_info ( & self , call : & mut Call_GetInfo , ) -> varlink :: Result < ( ) > ; fn resolve ( & self , call : & mut Call_Resolve , r#interface : String ) -> varlink :: Result < ( ) > ; fn call_upgraded ( & self , _call : & mut varlink :: Call , _bufreader : & mut BufRead ) -> varlink :: Result < Vec < u8 >> { Ok ( Vec :: new ( ) ) } } pub trait VarlinkClientInterface { fn get_info ( & mut self , ) -> varlink :: MethodCall < GetInfo_Args , GetInfo_Reply , Error > ; fn resolve ( & mut self , r#interface : String ) -> varlink :: MethodCall < Resolve_Args , Resolve_Reply , Error > ; } # [ allow ( dead_code ) ] pub struct VarlinkClient { connection : Arc < RwLock < varlink :: Connection >> , } impl VarlinkClient { # [ allow ( dead_code ) ] pub fn new ( connection : Arc < RwLock < varlink :: Connection >> ) -> Self { VarlinkClient { connection , } } } impl VarlinkClientInterface for VarlinkClient { fn get_info ( & mut self , ) -> varlink :: MethodCall < GetInfo_Args , GetInfo_Reply , Error > { varlink :: MethodCall :: < GetInfo_Args , GetInfo_Reply , Error > :: new ( self . connection . clone ( ) , "org.varlink.resolver.GetInfo" , GetInfo_Args { } ) } fn resolve ( & mut self , r#interface : String ) -> varlink :: MethodCall < Resolve_Args , Resolve_Reply , Error > { varlink :: MethodCall :: < Resolve_Args , Resolve_Reply , Error > :: new ( self . connection . clone ( ) , "org.varlink.resolver.Resolve" , Resolve_Args { r#interface } ) } } # [ allow ( dead_code ) ] pub struct VarlinkInterfaceProxy { inner : Box < VarlinkInterface + Send + Sync > , } # [ allow ( dead_code ) ] pub fn new ( inner : Box < VarlinkInterface + Send + Sync > ) -> VarlinkInterfaceProxy { VarlinkInterfaceProxy { inner } } impl varlink :: Interface for VarlinkInterfaceProxy { fn get_description ( & self ) -> & 'static str { "# Interface to resolve reverse-domain interface names to\n# service adresses\ninterface org.varlink.resolver\n\n# Get a list of all resolvable interfaces and information\n# about the resolver's identity.\nmethod GetInfo() -> (\n vendor: string,\n product: string,\n version: string,\n url: string,\n interfaces: []string\n)\n\n# Resolve an interface name to a registered varlink service address\nmethod Resolve(interface: string) -> (address: string)\n\nerror InterfaceNotFound (interface: string)\n" } fn get_name ( & self ) -> & 'static str { "org.varlink.resolver" } fn call_upgraded ( & self , call : & mut varlink :: Call , bufreader : & mut BufRead ) -> varlink :: Result < Vec < u8 >> { self . inner . call_upgraded ( call , bufreader ) } fn call ( & self , call : & mut varlink :: Call ) -> varlink :: Result < ( ) > { let req = call . request . unwrap ( ) ; match req . method . as_ref ( ) { "org.varlink.resolver.GetInfo" => self . inner . get_info ( call as & mut Call_GetInfo ) , "org.varlink.resolver.Resolve" => { if let Some ( args ) = req . parameters . clone ( ) { let args : Resolve_Args = match serde_json :: from_value ( args ) { Ok ( v ) => v , Err ( e ) => { let es = format ! ( "{}" , e ) ; let _ = call . reply_invalid_parameter ( es . clone ( ) ) ; return Err ( into_cherr ! ( varlink :: ErrorKind :: SerdeJsonDe ( es ) ) ) ; } } ; self . inner . resolve ( call as & mut Call_Resolve , args . r#interface ) } else { call . reply_invalid_parameter ( "parameters" . into ( ) ) } } , m => { call . reply_method_not_found ( String :: from ( m ) ) } } } } [INFO] [stderr] | ^^^^^^^^^^^^ help: use `dyn`: `dyn Call_GetInfo` [INFO] [stderr] [INFO] [stderr] warning: trait objects without an explicit `dyn` are deprecated [INFO] [stderr] --> /opt/crater/target/debug/build/varlink_stdinterfaces-54f76819d3207c73/out/org.varlink.resolver.rs:1:8232 [INFO] [stderr] | [INFO] [stderr] 1 | use chainerror :: * ; use serde_derive :: { { Deserialize , Serialize } } ; use serde_json ; use std :: io :: BufRead ; use std :: sync :: { { Arc , RwLock } } ; use varlink :: { { self , CallTrait } } ; # [ derive ( Serialize , Deserialize , Debug , PartialEq , Clone ) ] pub struct InterfaceNotFound_Args { pub r#interface : String , } pub trait VarlinkCallError : varlink :: CallTrait { fn reply_interface_not_found ( & mut self , r#interface : String ) -> varlink :: Result < ( ) > { self . reply_struct ( varlink :: Reply :: error ( "org.varlink.resolver.InterfaceNotFound" , Some ( serde_json :: to_value ( InterfaceNotFound_Args { r#interface } ) . map_err ( minto_cherr ! ( ) ) ? ) ) ) } } impl < 'a > VarlinkCallError for varlink :: Call < 'a > { } # [ allow ( dead_code ) ] # [ derive ( Clone , PartialEq , Debug ) ] pub enum ErrorKind { Io_Error ( :: std :: io :: ErrorKind ) , SerdeJson_Error ( serde_json :: error :: Category ) , Varlink_Error , VarlinkReply_Error ( varlink :: Reply ) , Generic , InterfaceNotFound ( Option < InterfaceNotFound_Args > ) } impl :: std :: fmt :: Display for ErrorKind { fn fmt ( & self , f : & mut :: std :: fmt :: Formatter ) -> :: std :: fmt :: Result { match self { ErrorKind :: Io_Error ( _ ) => write ! ( f , "IO error" ) , ErrorKind :: SerdeJson_Error ( _ ) => { write ! ( f , "(De)Serialization Error" ) } ErrorKind :: Varlink_Error => write ! ( f , "Varlink Error" ) , ErrorKind :: VarlinkReply_Error ( v ) => write ! ( f , "Unknown error reply: '{:#?}'" , v ) , ErrorKind :: Generic => Ok ( ( ) ) , ErrorKind :: InterfaceNotFound ( v ) => write ! ( f , "org.varlink.resolver.InterfaceNotFound: {:#?}" , v ) } } } impl :: std :: error :: Error for ErrorKind { } impl ChainErrorFrom < std :: io :: Error > for ErrorKind { fn chain_error_from ( e : std :: io :: Error , line_filename : Option < ( u32 , & 'static str ) > , ) -> ChainError < Self > { ChainError :: < _ > :: new ( ErrorKind :: Io_Error ( e . kind ( ) ) , Some ( Box :: from ( e ) ) , line_filename ) } } impl ChainErrorFrom < serde_json :: error :: Error > for ErrorKind { fn chain_error_from ( e : serde_json :: error :: Error , line_filename : Option < ( u32 , & 'static str ) > , ) -> ChainError < Self > { ChainError :: < _ > :: new ( ErrorKind :: SerdeJson_Error ( e . classify ( ) ) , Some ( Box :: from ( e ) ) , line_filename , ) } } impl ChainErrorFrom < varlink :: ErrorKind > for ErrorKind { fn chain_error_from ( e : varlink :: ErrorKind , line_filename : Option < ( u32 , & 'static str ) > , ) -> ChainError < Self > { ChainError :: < _ > :: new ( ErrorKind :: Varlink_Error , Some ( Box :: from ( ChainError :: < _ > :: new ( e , None , line_filename , ) ) ) , line_filename , ) } } # [ allow ( dead_code ) ] pub type Result < T > = ChainResult < T , ErrorKind > ; # [ allow ( dead_code ) ] pub type Error = ErrorKind ; impl ChainErrorFrom < varlink :: Reply > for ErrorKind { # [ allow ( unused_variables ) ] fn chain_error_from ( e : varlink :: Reply , line_filename : Option < ( u32 , & 'static str ) > ) -> ChainError < Self > { if varlink :: ErrorKind :: is_error ( & e ) { let e : varlink :: ErrorKind = e . into ( ) ; return into_cherr ! ( e ) ; } match e { varlink :: Reply { error : Some ( ref t ) , .. } if t == "org.varlink.resolver.InterfaceNotFound" => { match e { varlink :: Reply { parameters : Some ( p ) , .. } => match serde_json :: from_value ( p ) { Ok ( v ) => into_cherr ! ( ErrorKind :: InterfaceNotFound ( v ) ) , Err ( _ ) => into_cherr ! ( ErrorKind :: InterfaceNotFound ( None ) ) , } , _ => into_cherr ! ( ErrorKind :: InterfaceNotFound ( None ) ) , } } _ => into_cherr ! ( ErrorKind :: VarlinkReply_Error ( e ) ) , } } } # [ derive ( Serialize , Deserialize , Debug , PartialEq , Clone ) ] pub struct GetInfo_Reply { pub r#vendor : String , pub r#product : String , pub r#version : String , pub r#url : String , pub r#interfaces : Vec < String > , } impl varlink :: VarlinkReply for GetInfo_Reply { } # [ derive ( Serialize , Deserialize , Debug , PartialEq , Clone ) ] pub struct GetInfo_Args { } pub trait Call_GetInfo : VarlinkCallError { fn reply ( & mut self , r#vendor : String , r#product : String , r#version : String , r#url : String , r#interfaces : Vec < String > ) -> varlink :: Result < ( ) > { self . reply_struct ( GetInfo_Reply { r#vendor , r#product , r#version , r#url , r#interfaces } . into ( ) ) } } impl < 'a > Call_GetInfo for varlink :: Call < 'a > { } # [ derive ( Serialize , Deserialize , Debug , PartialEq , Clone ) ] pub struct Resolve_Reply { pub r#address : String , } impl varlink :: VarlinkReply for Resolve_Reply { } # [ derive ( Serialize , Deserialize , Debug , PartialEq , Clone ) ] pub struct Resolve_Args { pub r#interface : String , } pub trait Call_Resolve : VarlinkCallError { fn reply ( & mut self , r#address : String ) -> varlink :: Result < ( ) > { self . reply_struct ( Resolve_Reply { r#address } . into ( ) ) } } impl < 'a > Call_Resolve for varlink :: Call < 'a > { } pub trait VarlinkInterface { fn get_info ( & self , call : & mut Call_GetInfo , ) -> varlink :: Result < ( ) > ; fn resolve ( & self , call : & mut Call_Resolve , r#interface : String ) -> varlink :: Result < ( ) > ; fn call_upgraded ( & self , _call : & mut varlink :: Call , _bufreader : & mut BufRead ) -> varlink :: Result < Vec < u8 >> { Ok ( Vec :: new ( ) ) } } pub trait VarlinkClientInterface { fn get_info ( & mut self , ) -> varlink :: MethodCall < GetInfo_Args , GetInfo_Reply , Error > ; fn resolve ( & mut self , r#interface : String ) -> varlink :: MethodCall < Resolve_Args , Resolve_Reply , Error > ; } # [ allow ( dead_code ) ] pub struct VarlinkClient { connection : Arc < RwLock < varlink :: Connection >> , } impl VarlinkClient { # [ allow ( dead_code ) ] pub fn new ( connection : Arc < RwLock < varlink :: Connection >> ) -> Self { VarlinkClient { connection , } } } impl VarlinkClientInterface for VarlinkClient { fn get_info ( & mut self , ) -> varlink :: MethodCall < GetInfo_Args , GetInfo_Reply , Error > { varlink :: MethodCall :: < GetInfo_Args , GetInfo_Reply , Error > :: new ( self . connection . clone ( ) , "org.varlink.resolver.GetInfo" , GetInfo_Args { } ) } fn resolve ( & mut self , r#interface : String ) -> varlink :: MethodCall < Resolve_Args , Resolve_Reply , Error > { varlink :: MethodCall :: < Resolve_Args , Resolve_Reply , Error > :: new ( self . connection . clone ( ) , "org.varlink.resolver.Resolve" , Resolve_Args { r#interface } ) } } # [ allow ( dead_code ) ] pub struct VarlinkInterfaceProxy { inner : Box < VarlinkInterface + Send + Sync > , } # [ allow ( dead_code ) ] pub fn new ( inner : Box < VarlinkInterface + Send + Sync > ) -> VarlinkInterfaceProxy { VarlinkInterfaceProxy { inner } } impl varlink :: Interface for VarlinkInterfaceProxy { fn get_description ( & self ) -> & 'static str { "# Interface to resolve reverse-domain interface names to\n# service adresses\ninterface org.varlink.resolver\n\n# Get a list of all resolvable interfaces and information\n# about the resolver's identity.\nmethod GetInfo() -> (\n vendor: string,\n product: string,\n version: string,\n url: string,\n interfaces: []string\n)\n\n# Resolve an interface name to a registered varlink service address\nmethod Resolve(interface: string) -> (address: string)\n\nerror InterfaceNotFound (interface: string)\n" } fn get_name ( & self ) -> & 'static str { "org.varlink.resolver" } fn call_upgraded ( & self , call : & mut varlink :: Call , bufreader : & mut BufRead ) -> varlink :: Result < Vec < u8 >> { self . inner . call_upgraded ( call , bufreader ) } fn call ( & self , call : & mut varlink :: Call ) -> varlink :: Result < ( ) > { let req = call . request . unwrap ( ) ; match req . method . as_ref ( ) { "org.varlink.resolver.GetInfo" => self . inner . get_info ( call as & mut Call_GetInfo ) , "org.varlink.resolver.Resolve" => { if let Some ( args ) = req . parameters . clone ( ) { let args : Resolve_Args = match serde_json :: from_value ( args ) { Ok ( v ) => v , Err ( e ) => { let es = format ! ( "{}" , e ) ; let _ = call . reply_invalid_parameter ( es . clone ( ) ) ; return Err ( into_cherr ! ( varlink :: ErrorKind :: SerdeJsonDe ( es ) ) ) ; } } ; self . inner . resolve ( call as & mut Call_Resolve , args . r#interface ) } else { call . reply_invalid_parameter ( "parameters" . into ( ) ) } } , m => { call . reply_method_not_found ( String :: from ( m ) ) } } } } [INFO] [stderr] | ^^^^^^^^^^^^ help: use `dyn`: `dyn Call_Resolve` [INFO] [stderr] [INFO] [stderr] warning: trait objects without an explicit `dyn` are deprecated [INFO] [stderr] --> src/org_varlink_service.rs:239:35 [INFO] [stderr] | [INFO] [stderr] 239 | fn get_info(&self, call: &mut Call_GetInfo) -> varlink::Result<()>; [INFO] [stderr] | ^^^^^^^^^^^^ help: use `dyn`: `dyn Call_GetInfo` [INFO] [stderr] [INFO] [stderr] warning: trait objects without an explicit `dyn` are deprecated [INFO] [stderr] --> src/org_varlink_service.rs:242:20 [INFO] [stderr] | [INFO] [stderr] 242 | call: &mut Call_GetInterfaceDescription, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `dyn`: `dyn Call_GetInterfaceDescription` [INFO] [stderr] [INFO] [stderr] warning: trait objects without an explicit `dyn` are deprecated [INFO] [stderr] --> src/org_varlink_service.rs:248:26 [INFO] [stderr] | [INFO] [stderr] 248 | _bufreader: &mut BufRead, [INFO] [stderr] | ^^^^^^^ help: use `dyn`: `dyn BufRead` [INFO] [stderr] [INFO] [stderr] warning: trait objects without an explicit `dyn` are deprecated [INFO] [stderr] --> src/org_varlink_service.rs:293:16 [INFO] [stderr] | [INFO] [stderr] 293 | inner: Box, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `dyn`: `dyn VarlinkInterface + Send + Sync` [INFO] [stderr] [INFO] [stderr] warning: trait objects without an explicit `dyn` are deprecated [INFO] [stderr] --> src/org_varlink_service.rs:297:23 [INFO] [stderr] | [INFO] [stderr] 297 | pub fn new(inner: Box) -> VarlinkInterfaceProxy { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `dyn`: `dyn VarlinkInterface + Send + Sync` [INFO] [stderr] [INFO] [stderr] warning: trait objects without an explicit `dyn` are deprecated [INFO] [stderr] --> src/org_varlink_service.rs:311:25 [INFO] [stderr] | [INFO] [stderr] 311 | bufreader: &mut BufRead, [INFO] [stderr] | ^^^^^^^ help: use `dyn`: `dyn BufRead` [INFO] [stderr] [INFO] [stderr] warning: trait objects without an explicit `dyn` are deprecated [INFO] [stderr] --> src/org_varlink_service.rs:318:79 [INFO] [stderr] | [INFO] [stderr] 318 | "org.varlink.service.GetInfo" => self.inner.get_info(call as &mut Call_GetInfo), [INFO] [stderr] | ^^^^^^^^^^^^ help: use `dyn`: `dyn Call_GetInfo` [INFO] [stderr] [INFO] [stderr] warning: trait objects without an explicit `dyn` are deprecated [INFO] [stderr] --> src/org_varlink_service.rs:330:38 [INFO] [stderr] | [INFO] [stderr] 330 | call as &mut Call_GetInterfaceDescription, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `dyn`: `dyn Call_GetInterfaceDescription` [INFO] [stderr] [INFO] [stderr] warning: trait objects without an explicit `dyn` are deprecated [INFO] [stderr] --> /opt/crater/target/debug/build/varlink_stdinterfaces-54f76819d3207c73/out/org.varlink.resolver.rs:1:5043 [INFO] [stderr] | [INFO] [stderr] 1 | use chainerror :: * ; use serde_derive :: { { Deserialize , Serialize } } ; use serde_json ; use std :: io :: BufRead ; use std :: sync :: { { Arc , RwLock } } ; use varlink :: { { self , CallTrait } } ; # [ derive ( Serialize , Deserialize , Debug , PartialEq , Clone ) ] pub struct InterfaceNotFound_Args { pub r#interface : String , } pub trait VarlinkCallError : varlink :: CallTrait { fn reply_interface_not_found ( & mut self , r#interface : String ) -> varlink :: Result < ( ) > { self . reply_struct ( varlink :: Reply :: error ( "org.varlink.resolver.InterfaceNotFound" , Some ( serde_json :: to_value ( InterfaceNotFound_Args { r#interface } ) . map_err ( minto_cherr ! ( ) ) ? ) ) ) } } impl < 'a > VarlinkCallError for varlink :: Call < 'a > { } # [ allow ( dead_code ) ] # [ derive ( Clone , PartialEq , Debug ) ] pub enum ErrorKind { Io_Error ( :: std :: io :: ErrorKind ) , SerdeJson_Error ( serde_json :: error :: Category ) , Varlink_Error , VarlinkReply_Error ( varlink :: Reply ) , Generic , InterfaceNotFound ( Option < InterfaceNotFound_Args > ) } impl :: std :: fmt :: Display for ErrorKind { fn fmt ( & self , f : & mut :: std :: fmt :: Formatter ) -> :: std :: fmt :: Result { match self { ErrorKind :: Io_Error ( _ ) => write ! ( f , "IO error" ) , ErrorKind :: SerdeJson_Error ( _ ) => { write ! ( f , "(De)Serialization Error" ) } ErrorKind :: Varlink_Error => write ! ( f , "Varlink Error" ) , ErrorKind :: VarlinkReply_Error ( v ) => write ! ( f , "Unknown error reply: '{:#?}'" , v ) , ErrorKind :: Generic => Ok ( ( ) ) , ErrorKind :: InterfaceNotFound ( v ) => write ! ( f , "org.varlink.resolver.InterfaceNotFound: {:#?}" , v ) } } } impl :: std :: error :: Error for ErrorKind { } impl ChainErrorFrom < std :: io :: Error > for ErrorKind { fn chain_error_from ( e : std :: io :: Error , line_filename : Option < ( u32 , & 'static str ) > , ) -> ChainError < Self > { ChainError :: < _ > :: new ( ErrorKind :: Io_Error ( e . kind ( ) ) , Some ( Box :: from ( e ) ) , line_filename ) } } impl ChainErrorFrom < serde_json :: error :: Error > for ErrorKind { fn chain_error_from ( e : serde_json :: error :: Error , line_filename : Option < ( u32 , & 'static str ) > , ) -> ChainError < Self > { ChainError :: < _ > :: new ( ErrorKind :: SerdeJson_Error ( e . classify ( ) ) , Some ( Box :: from ( e ) ) , line_filename , ) } } impl ChainErrorFrom < varlink :: ErrorKind > for ErrorKind { fn chain_error_from ( e : varlink :: ErrorKind , line_filename : Option < ( u32 , & 'static str ) > , ) -> ChainError < Self > { ChainError :: < _ > :: new ( ErrorKind :: Varlink_Error , Some ( Box :: from ( ChainError :: < _ > :: new ( e , None , line_filename , ) ) ) , line_filename , ) } } # [ allow ( dead_code ) ] pub type Result < T > = ChainResult < T , ErrorKind > ; # [ allow ( dead_code ) ] pub type Error = ErrorKind ; impl ChainErrorFrom < varlink :: Reply > for ErrorKind { # [ allow ( unused_variables ) ] fn chain_error_from ( e : varlink :: Reply , line_filename : Option < ( u32 , & 'static str ) > ) -> ChainError < Self > { if varlink :: ErrorKind :: is_error ( & e ) { let e : varlink :: ErrorKind = e . into ( ) ; return into_cherr ! ( e ) ; } match e { varlink :: Reply { error : Some ( ref t ) , .. } if t == "org.varlink.resolver.InterfaceNotFound" => { match e { varlink :: Reply { parameters : Some ( p ) , .. } => match serde_json :: from_value ( p ) { Ok ( v ) => into_cherr ! ( ErrorKind :: InterfaceNotFound ( v ) ) , Err ( _ ) => into_cherr ! ( ErrorKind :: InterfaceNotFound ( None ) ) , } , _ => into_cherr ! ( ErrorKind :: InterfaceNotFound ( None ) ) , } } _ => into_cherr ! ( ErrorKind :: VarlinkReply_Error ( e ) ) , } } } # [ derive ( Serialize , Deserialize , Debug , PartialEq , Clone ) ] pub struct GetInfo_Reply { pub r#vendor : String , pub r#product : String , pub r#version : String , pub r#url : String , pub r#interfaces : Vec < String > , } impl varlink :: VarlinkReply for GetInfo_Reply { } # [ derive ( Serialize , Deserialize , Debug , PartialEq , Clone ) ] pub struct GetInfo_Args { } pub trait Call_GetInfo : VarlinkCallError { fn reply ( & mut self , r#vendor : String , r#product : String , r#version : String , r#url : String , r#interfaces : Vec < String > ) -> varlink :: Result < ( ) > { self . reply_struct ( GetInfo_Reply { r#vendor , r#product , r#version , r#url , r#interfaces } . into ( ) ) } } impl < 'a > Call_GetInfo for varlink :: Call < 'a > { } # [ derive ( Serialize , Deserialize , Debug , PartialEq , Clone ) ] pub struct Resolve_Reply { pub r#address : String , } impl varlink :: VarlinkReply for Resolve_Reply { } # [ derive ( Serialize , Deserialize , Debug , PartialEq , Clone ) ] pub struct Resolve_Args { pub r#interface : String , } pub trait Call_Resolve : VarlinkCallError { fn reply ( & mut self , r#address : String ) -> varlink :: Result < ( ) > { self . reply_struct ( Resolve_Reply { r#address } . into ( ) ) } } impl < 'a > Call_Resolve for varlink :: Call < 'a > { } pub trait VarlinkInterface { fn get_info ( & self , call : & mut Call_GetInfo , ) -> varlink :: Result < ( ) > ; fn resolve ( & self , call : & mut Call_Resolve , r#interface : String ) -> varlink :: Result < ( ) > ; fn call_upgraded ( & self , _call : & mut varlink :: Call , _bufreader : & mut BufRead ) -> varlink :: Result < Vec < u8 >> { Ok ( Vec :: new ( ) ) } } pub trait VarlinkClientInterface { fn get_info ( & mut self , ) -> varlink :: MethodCall < GetInfo_Args , GetInfo_Reply , Error > ; fn resolve ( & mut self , r#interface : String ) -> varlink :: MethodCall < Resolve_Args , Resolve_Reply , Error > ; } # [ allow ( dead_code ) ] pub struct VarlinkClient { connection : Arc < RwLock < varlink :: Connection >> , } impl VarlinkClient { # [ allow ( dead_code ) ] pub fn new ( connection : Arc < RwLock < varlink :: Connection >> ) -> Self { VarlinkClient { connection , } } } impl VarlinkClientInterface for VarlinkClient { fn get_info ( & mut self , ) -> varlink :: MethodCall < GetInfo_Args , GetInfo_Reply , Error > { varlink :: MethodCall :: < GetInfo_Args , GetInfo_Reply , Error > :: new ( self . connection . clone ( ) , "org.varlink.resolver.GetInfo" , GetInfo_Args { } ) } fn resolve ( & mut self , r#interface : String ) -> varlink :: MethodCall < Resolve_Args , Resolve_Reply , Error > { varlink :: MethodCall :: < Resolve_Args , Resolve_Reply , Error > :: new ( self . connection . clone ( ) , "org.varlink.resolver.Resolve" , Resolve_Args { r#interface } ) } } # [ allow ( dead_code ) ] pub struct VarlinkInterfaceProxy { inner : Box < VarlinkInterface + Send + Sync > , } # [ allow ( dead_code ) ] pub fn new ( inner : Box < VarlinkInterface + Send + Sync > ) -> VarlinkInterfaceProxy { VarlinkInterfaceProxy { inner } } impl varlink :: Interface for VarlinkInterfaceProxy { fn get_description ( & self ) -> & 'static str { "# Interface to resolve reverse-domain interface names to\n# service adresses\ninterface org.varlink.resolver\n\n# Get a list of all resolvable interfaces and information\n# about the resolver's identity.\nmethod GetInfo() -> (\n vendor: string,\n product: string,\n version: string,\n url: string,\n interfaces: []string\n)\n\n# Resolve an interface name to a registered varlink service address\nmethod Resolve(interface: string) -> (address: string)\n\nerror InterfaceNotFound (interface: string)\n" } fn get_name ( & self ) -> & 'static str { "org.varlink.resolver" } fn call_upgraded ( & self , call : & mut varlink :: Call , bufreader : & mut BufRead ) -> varlink :: Result < Vec < u8 >> { self . inner . call_upgraded ( call , bufreader ) } fn call ( & self , call : & mut varlink :: Call ) -> varlink :: Result < ( ) > { let req = call . request . unwrap ( ) ; match req . method . as_ref ( ) { "org.varlink.resolver.GetInfo" => self . inner . get_info ( call as & mut Call_GetInfo ) , "org.varlink.resolver.Resolve" => { if let Some ( args ) = req . parameters . clone ( ) { let args : Resolve_Args = match serde_json :: from_value ( args ) { Ok ( v ) => v , Err ( e ) => { let es = format ! ( "{}" , e ) ; let _ = call . reply_invalid_parameter ( es . clone ( ) ) ; return Err ( into_cherr ! ( varlink :: ErrorKind :: SerdeJsonDe ( es ) ) ) ; } } ; self . inner . resolve ( call as & mut Call_Resolve , args . r#interface ) } else { call . reply_invalid_parameter ( "parameters" . into ( ) ) } } , m => { call . reply_method_not_found ( String :: from ( m ) ) } } } } [INFO] [stderr] | ^^^^^^^^^^^^ help: use `dyn`: `dyn Call_GetInfo` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(bare_trait_objects)] on by default [INFO] [stderr] [INFO] [stderr] warning: trait objects without an explicit `dyn` are deprecated [INFO] [stderr] --> /opt/crater/target/debug/build/varlink_stdinterfaces-54f76819d3207c73/out/org.varlink.resolver.rs:1:5126 [INFO] [stderr] | [INFO] [stderr] 1 | use chainerror :: * ; use serde_derive :: { { Deserialize , Serialize } } ; use serde_json ; use std :: io :: BufRead ; use std :: sync :: { { Arc , RwLock } } ; use varlink :: { { self , CallTrait } } ; # [ derive ( Serialize , Deserialize , Debug , PartialEq , Clone ) ] pub struct InterfaceNotFound_Args { pub r#interface : String , } pub trait VarlinkCallError : varlink :: CallTrait { fn reply_interface_not_found ( & mut self , r#interface : String ) -> varlink :: Result < ( ) > { self . reply_struct ( varlink :: Reply :: error ( "org.varlink.resolver.InterfaceNotFound" , Some ( serde_json :: to_value ( InterfaceNotFound_Args { r#interface } ) . map_err ( minto_cherr ! ( ) ) ? ) ) ) } } impl < 'a > VarlinkCallError for varlink :: Call < 'a > { } # [ allow ( dead_code ) ] # [ derive ( Clone , PartialEq , Debug ) ] pub enum ErrorKind { Io_Error ( :: std :: io :: ErrorKind ) , SerdeJson_Error ( serde_json :: error :: Category ) , Varlink_Error , VarlinkReply_Error ( varlink :: Reply ) , Generic , InterfaceNotFound ( Option < InterfaceNotFound_Args > ) } impl :: std :: fmt :: Display for ErrorKind { fn fmt ( & self , f : & mut :: std :: fmt :: Formatter ) -> :: std :: fmt :: Result { match self { ErrorKind :: Io_Error ( _ ) => write ! ( f , "IO error" ) , ErrorKind :: SerdeJson_Error ( _ ) => { write ! ( f , "(De)Serialization Error" ) } ErrorKind :: Varlink_Error => write ! ( f , "Varlink Error" ) , ErrorKind :: VarlinkReply_Error ( v ) => write ! ( f , "Unknown error reply: '{:#?}'" , v ) , ErrorKind :: Generic => Ok ( ( ) ) , ErrorKind :: InterfaceNotFound ( v ) => write ! ( f , "org.varlink.resolver.InterfaceNotFound: {:#?}" , v ) } } } impl :: std :: error :: Error for ErrorKind { } impl ChainErrorFrom < std :: io :: Error > for ErrorKind { fn chain_error_from ( e : std :: io :: Error , line_filename : Option < ( u32 , & 'static str ) > , ) -> ChainError < Self > { ChainError :: < _ > :: new ( ErrorKind :: Io_Error ( e . kind ( ) ) , Some ( Box :: from ( e ) ) , line_filename ) } } impl ChainErrorFrom < serde_json :: error :: Error > for ErrorKind { fn chain_error_from ( e : serde_json :: error :: Error , line_filename : Option < ( u32 , & 'static str ) > , ) -> ChainError < Self > { ChainError :: < _ > :: new ( ErrorKind :: SerdeJson_Error ( e . classify ( ) ) , Some ( Box :: from ( e ) ) , line_filename , ) } } impl ChainErrorFrom < varlink :: ErrorKind > for ErrorKind { fn chain_error_from ( e : varlink :: ErrorKind , line_filename : Option < ( u32 , & 'static str ) > , ) -> ChainError < Self > { ChainError :: < _ > :: new ( ErrorKind :: Varlink_Error , Some ( Box :: from ( ChainError :: < _ > :: new ( e , None , line_filename , ) ) ) , line_filename , ) } } # [ allow ( dead_code ) ] pub type Result < T > = ChainResult < T , ErrorKind > ; # [ allow ( dead_code ) ] pub type Error = ErrorKind ; impl ChainErrorFrom < varlink :: Reply > for ErrorKind { # [ allow ( unused_variables ) ] fn chain_error_from ( e : varlink :: Reply , line_filename : Option < ( u32 , & 'static str ) > ) -> ChainError < Self > { if varlink :: ErrorKind :: is_error ( & e ) { let e : varlink :: ErrorKind = e . into ( ) ; return into_cherr ! ( e ) ; } match e { varlink :: Reply { error : Some ( ref t ) , .. } if t == "org.varlink.resolver.InterfaceNotFound" => { match e { varlink :: Reply { parameters : Some ( p ) , .. } => match serde_json :: from_value ( p ) { Ok ( v ) => into_cherr ! ( ErrorKind :: InterfaceNotFound ( v ) ) , Err ( _ ) => into_cherr ! ( ErrorKind :: InterfaceNotFound ( None ) ) , } , _ => into_cherr ! ( ErrorKind :: InterfaceNotFound ( None ) ) , } } _ => into_cherr ! ( ErrorKind :: VarlinkReply_Error ( e ) ) , } } } # [ derive ( Serialize , Deserialize , Debug , PartialEq , Clone ) ] pub struct GetInfo_Reply { pub r#vendor : String , pub r#product : String , pub r#version : String , pub r#url : String , pub r#interfaces : Vec < String > , } impl varlink :: VarlinkReply for GetInfo_Reply { } # [ derive ( Serialize , Deserialize , Debug , PartialEq , Clone ) ] pub struct GetInfo_Args { } pub trait Call_GetInfo : VarlinkCallError { fn reply ( & mut self , r#vendor : String , r#product : String , r#version : String , r#url : String , r#interfaces : Vec < String > ) -> varlink :: Result < ( ) > { self . reply_struct ( GetInfo_Reply { r#vendor , r#product , r#version , r#url , r#interfaces } . into ( ) ) } } impl < 'a > Call_GetInfo for varlink :: Call < 'a > { } # [ derive ( Serialize , Deserialize , Debug , PartialEq , Clone ) ] pub struct Resolve_Reply { pub r#address : String , } impl varlink :: VarlinkReply for Resolve_Reply { } # [ derive ( Serialize , Deserialize , Debug , PartialEq , Clone ) ] pub struct Resolve_Args { pub r#interface : String , } pub trait Call_Resolve : VarlinkCallError { fn reply ( & mut self , r#address : String ) -> varlink :: Result < ( ) > { self . reply_struct ( Resolve_Reply { r#address } . into ( ) ) } } impl < 'a > Call_Resolve for varlink :: Call < 'a > { } pub trait VarlinkInterface { fn get_info ( & self , call : & mut Call_GetInfo , ) -> varlink :: Result < ( ) > ; fn resolve ( & self , call : & mut Call_Resolve , r#interface : String ) -> varlink :: Result < ( ) > ; fn call_upgraded ( & self , _call : & mut varlink :: Call , _bufreader : & mut BufRead ) -> varlink :: Result < Vec < u8 >> { Ok ( Vec :: new ( ) ) } } pub trait VarlinkClientInterface { fn get_info ( & mut self , ) -> varlink :: MethodCall < GetInfo_Args , GetInfo_Reply , Error > ; fn resolve ( & mut self , r#interface : String ) -> varlink :: MethodCall < Resolve_Args , Resolve_Reply , Error > ; } # [ allow ( dead_code ) ] pub struct VarlinkClient { connection : Arc < RwLock < varlink :: Connection >> , } impl VarlinkClient { # [ allow ( dead_code ) ] pub fn new ( connection : Arc < RwLock < varlink :: Connection >> ) -> Self { VarlinkClient { connection , } } } impl VarlinkClientInterface for VarlinkClient { fn get_info ( & mut self , ) -> varlink :: MethodCall < GetInfo_Args , GetInfo_Reply , Error > { varlink :: MethodCall :: < GetInfo_Args , GetInfo_Reply , Error > :: new ( self . connection . clone ( ) , "org.varlink.resolver.GetInfo" , GetInfo_Args { } ) } fn resolve ( & mut self , r#interface : String ) -> varlink :: MethodCall < Resolve_Args , Resolve_Reply , Error > { varlink :: MethodCall :: < Resolve_Args , Resolve_Reply , Error > :: new ( self . connection . clone ( ) , "org.varlink.resolver.Resolve" , Resolve_Args { r#interface } ) } } # [ allow ( dead_code ) ] pub struct VarlinkInterfaceProxy { inner : Box < VarlinkInterface + Send + Sync > , } # [ allow ( dead_code ) ] pub fn new ( inner : Box < VarlinkInterface + Send + Sync > ) -> VarlinkInterfaceProxy { VarlinkInterfaceProxy { inner } } impl varlink :: Interface for VarlinkInterfaceProxy { fn get_description ( & self ) -> & 'static str { "# Interface to resolve reverse-domain interface names to\n# service adresses\ninterface org.varlink.resolver\n\n# Get a list of all resolvable interfaces and information\n# about the resolver's identity.\nmethod GetInfo() -> (\n vendor: string,\n product: string,\n version: string,\n url: string,\n interfaces: []string\n)\n\n# Resolve an interface name to a registered varlink service address\nmethod Resolve(interface: string) -> (address: string)\n\nerror InterfaceNotFound (interface: string)\n" } fn get_name ( & self ) -> & 'static str { "org.varlink.resolver" } fn call_upgraded ( & self , call : & mut varlink :: Call , bufreader : & mut BufRead ) -> varlink :: Result < Vec < u8 >> { self . inner . call_upgraded ( call , bufreader ) } fn call ( & self , call : & mut varlink :: Call ) -> varlink :: Result < ( ) > { let req = call . request . unwrap ( ) ; match req . method . as_ref ( ) { "org.varlink.resolver.GetInfo" => self . inner . get_info ( call as & mut Call_GetInfo ) , "org.varlink.resolver.Resolve" => { if let Some ( args ) = req . parameters . clone ( ) { let args : Resolve_Args = match serde_json :: from_value ( args ) { Ok ( v ) => v , Err ( e ) => { let es = format ! ( "{}" , e ) ; let _ = call . reply_invalid_parameter ( es . clone ( ) ) ; return Err ( into_cherr ! ( varlink :: ErrorKind :: SerdeJsonDe ( es ) ) ) ; } } ; self . inner . resolve ( call as & mut Call_Resolve , args . r#interface ) } else { call . reply_invalid_parameter ( "parameters" . into ( ) ) } } , m => { call . reply_method_not_found ( String :: from ( m ) ) } } } } [INFO] [stderr] | ^^^^^^^^^^^^ help: use `dyn`: `dyn Call_Resolve` [INFO] [stderr] [INFO] [stderr] warning: trait objects without an explicit `dyn` are deprecated [INFO] [stderr] --> /opt/crater/target/debug/build/varlink_stdinterfaces-54f76819d3207c73/out/org.varlink.resolver.rs:1:5274 [INFO] [stderr] | [INFO] [stderr] 1 | use chainerror :: * ; use serde_derive :: { { Deserialize , Serialize } } ; use serde_json ; use std :: io :: BufRead ; use std :: sync :: { { Arc , RwLock } } ; use varlink :: { { self , CallTrait } } ; # [ derive ( Serialize , Deserialize , Debug , PartialEq , Clone ) ] pub struct InterfaceNotFound_Args { pub r#interface : String , } pub trait VarlinkCallError : varlink :: CallTrait { fn reply_interface_not_found ( & mut self , r#interface : String ) -> varlink :: Result < ( ) > { self . reply_struct ( varlink :: Reply :: error ( "org.varlink.resolver.InterfaceNotFound" , Some ( serde_json :: to_value ( InterfaceNotFound_Args { r#interface } ) . map_err ( minto_cherr ! ( ) ) ? ) ) ) } } impl < 'a > VarlinkCallError for varlink :: Call < 'a > { } # [ allow ( dead_code ) ] # [ derive ( Clone , PartialEq , Debug ) ] pub enum ErrorKind { Io_Error ( :: std :: io :: ErrorKind ) , SerdeJson_Error ( serde_json :: error :: Category ) , Varlink_Error , VarlinkReply_Error ( varlink :: Reply ) , Generic , InterfaceNotFound ( Option < InterfaceNotFound_Args > ) } impl :: std :: fmt :: Display for ErrorKind { fn fmt ( & self , f : & mut :: std :: fmt :: Formatter ) -> :: std :: fmt :: Result { match self { ErrorKind :: Io_Error ( _ ) => write ! ( f , "IO error" ) , ErrorKind :: SerdeJson_Error ( _ ) => { write ! ( f , "(De)Serialization Error" ) } ErrorKind :: Varlink_Error => write ! ( f , "Varlink Error" ) , ErrorKind :: VarlinkReply_Error ( v ) => write ! ( f , "Unknown error reply: '{:#?}'" , v ) , ErrorKind :: Generic => Ok ( ( ) ) , ErrorKind :: InterfaceNotFound ( v ) => write ! ( f , "org.varlink.resolver.InterfaceNotFound: {:#?}" , v ) } } } impl :: std :: error :: Error for ErrorKind { } impl ChainErrorFrom < std :: io :: Error > for ErrorKind { fn chain_error_from ( e : std :: io :: Error , line_filename : Option < ( u32 , & 'static str ) > , ) -> ChainError < Self > { ChainError :: < _ > :: new ( ErrorKind :: Io_Error ( e . kind ( ) ) , Some ( Box :: from ( e ) ) , line_filename ) } } impl ChainErrorFrom < serde_json :: error :: Error > for ErrorKind { fn chain_error_from ( e : serde_json :: error :: Error , line_filename : Option < ( u32 , & 'static str ) > , ) -> ChainError < Self > { ChainError :: < _ > :: new ( ErrorKind :: SerdeJson_Error ( e . classify ( ) ) , Some ( Box :: from ( e ) ) , line_filename , ) } } impl ChainErrorFrom < varlink :: ErrorKind > for ErrorKind { fn chain_error_from ( e : varlink :: ErrorKind , line_filename : Option < ( u32 , & 'static str ) > , ) -> ChainError < Self > { ChainError :: < _ > :: new ( ErrorKind :: Varlink_Error , Some ( Box :: from ( ChainError :: < _ > :: new ( e , None , line_filename , ) ) ) , line_filename , ) } } # [ allow ( dead_code ) ] pub type Result < T > = ChainResult < T , ErrorKind > ; # [ allow ( dead_code ) ] pub type Error = ErrorKind ; impl ChainErrorFrom < varlink :: Reply > for ErrorKind { # [ allow ( unused_variables ) ] fn chain_error_from ( e : varlink :: Reply , line_filename : Option < ( u32 , & 'static str ) > ) -> ChainError < Self > { if varlink :: ErrorKind :: is_error ( & e ) { let e : varlink :: ErrorKind = e . into ( ) ; return into_cherr ! ( e ) ; } match e { varlink :: Reply { error : Some ( ref t ) , .. } if t == "org.varlink.resolver.InterfaceNotFound" => { match e { varlink :: Reply { parameters : Some ( p ) , .. } => match serde_json :: from_value ( p ) { Ok ( v ) => into_cherr ! ( ErrorKind :: InterfaceNotFound ( v ) ) , Err ( _ ) => into_cherr ! ( ErrorKind :: InterfaceNotFound ( None ) ) , } , _ => into_cherr ! ( ErrorKind :: InterfaceNotFound ( None ) ) , } } _ => into_cherr ! ( ErrorKind :: VarlinkReply_Error ( e ) ) , } } } # [ derive ( Serialize , Deserialize , Debug , PartialEq , Clone ) ] pub struct GetInfo_Reply { pub r#vendor : String , pub r#product : String , pub r#version : String , pub r#url : String , pub r#interfaces : Vec < String > , } impl varlink :: VarlinkReply for GetInfo_Reply { } # [ derive ( Serialize , Deserialize , Debug , PartialEq , Clone ) ] pub struct GetInfo_Args { } pub trait Call_GetInfo : VarlinkCallError { fn reply ( & mut self , r#vendor : String , r#product : String , r#version : String , r#url : String , r#interfaces : Vec < String > ) -> varlink :: Result < ( ) > { self . reply_struct ( GetInfo_Reply { r#vendor , r#product , r#version , r#url , r#interfaces } . into ( ) ) } } impl < 'a > Call_GetInfo for varlink :: Call < 'a > { } # [ derive ( Serialize , Deserialize , Debug , PartialEq , Clone ) ] pub struct Resolve_Reply { pub r#address : String , } impl varlink :: VarlinkReply for Resolve_Reply { } # [ derive ( Serialize , Deserialize , Debug , PartialEq , Clone ) ] pub struct Resolve_Args { pub r#interface : String , } pub trait Call_Resolve : VarlinkCallError { fn reply ( & mut self , r#address : String ) -> varlink :: Result < ( ) > { self . reply_struct ( Resolve_Reply { r#address } . into ( ) ) } } impl < 'a > Call_Resolve for varlink :: Call < 'a > { } pub trait VarlinkInterface { fn get_info ( & self , call : & mut Call_GetInfo , ) -> varlink :: Result < ( ) > ; fn resolve ( & self , call : & mut Call_Resolve , r#interface : String ) -> varlink :: Result < ( ) > ; fn call_upgraded ( & self , _call : & mut varlink :: Call , _bufreader : & mut BufRead ) -> varlink :: Result < Vec < u8 >> { Ok ( Vec :: new ( ) ) } } pub trait VarlinkClientInterface { fn get_info ( & mut self , ) -> varlink :: MethodCall < GetInfo_Args , GetInfo_Reply , Error > ; fn resolve ( & mut self , r#interface : String ) -> varlink :: MethodCall < Resolve_Args , Resolve_Reply , Error > ; } # [ allow ( dead_code ) ] pub struct VarlinkClient { connection : Arc < RwLock < varlink :: Connection >> , } impl VarlinkClient { # [ allow ( dead_code ) ] pub fn new ( connection : Arc < RwLock < varlink :: Connection >> ) -> Self { VarlinkClient { connection , } } } impl VarlinkClientInterface for VarlinkClient { fn get_info ( & mut self , ) -> varlink :: MethodCall < GetInfo_Args , GetInfo_Reply , Error > { varlink :: MethodCall :: < GetInfo_Args , GetInfo_Reply , Error > :: new ( self . connection . clone ( ) , "org.varlink.resolver.GetInfo" , GetInfo_Args { } ) } fn resolve ( & mut self , r#interface : String ) -> varlink :: MethodCall < Resolve_Args , Resolve_Reply , Error > { varlink :: MethodCall :: < Resolve_Args , Resolve_Reply , Error > :: new ( self . connection . clone ( ) , "org.varlink.resolver.Resolve" , Resolve_Args { r#interface } ) } } # [ allow ( dead_code ) ] pub struct VarlinkInterfaceProxy { inner : Box < VarlinkInterface + Send + Sync > , } # [ allow ( dead_code ) ] pub fn new ( inner : Box < VarlinkInterface + Send + Sync > ) -> VarlinkInterfaceProxy { VarlinkInterfaceProxy { inner } } impl varlink :: Interface for VarlinkInterfaceProxy { fn get_description ( & self ) -> & 'static str { "# Interface to resolve reverse-domain interface names to\n# service adresses\ninterface org.varlink.resolver\n\n# Get a list of all resolvable interfaces and information\n# about the resolver's identity.\nmethod GetInfo() -> (\n vendor: string,\n product: string,\n version: string,\n url: string,\n interfaces: []string\n)\n\n# Resolve an interface name to a registered varlink service address\nmethod Resolve(interface: string) -> (address: string)\n\nerror InterfaceNotFound (interface: string)\n" } fn get_name ( & self ) -> & 'static str { "org.varlink.resolver" } fn call_upgraded ( & self , call : & mut varlink :: Call , bufreader : & mut BufRead ) -> varlink :: Result < Vec < u8 >> { self . inner . call_upgraded ( call , bufreader ) } fn call ( & self , call : & mut varlink :: Call ) -> varlink :: Result < ( ) > { let req = call . request . unwrap ( ) ; match req . method . as_ref ( ) { "org.varlink.resolver.GetInfo" => self . inner . get_info ( call as & mut Call_GetInfo ) , "org.varlink.resolver.Resolve" => { if let Some ( args ) = req . parameters . clone ( ) { let args : Resolve_Args = match serde_json :: from_value ( args ) { Ok ( v ) => v , Err ( e ) => { let es = format ! ( "{}" , e ) ; let _ = call . reply_invalid_parameter ( es . clone ( ) ) ; return Err ( into_cherr ! ( varlink :: ErrorKind :: SerdeJsonDe ( es ) ) ) ; } } ; self . inner . resolve ( call as & mut Call_Resolve , args . r#interface ) } else { call . reply_invalid_parameter ( "parameters" . into ( ) ) } } , m => { call . reply_method_not_found ( String :: from ( m ) ) } } } } [INFO] [stderr] | ^^^^^^^ help: use `dyn`: `dyn BufRead` [INFO] [stderr] [INFO] [stderr] warning: trait objects without an explicit `dyn` are deprecated [INFO] [stderr] --> /opt/crater/target/debug/build/varlink_stdinterfaces-54f76819d3207c73/out/org.varlink.resolver.rs:1:6541 [INFO] [stderr] | [INFO] [stderr] 1 | use chainerror :: * ; use serde_derive :: { { Deserialize , Serialize } } ; use serde_json ; use std :: io :: BufRead ; use std :: sync :: { { Arc , RwLock } } ; use varlink :: { { self , CallTrait } } ; # [ derive ( Serialize , Deserialize , Debug , PartialEq , Clone ) ] pub struct InterfaceNotFound_Args { pub r#interface : String , } pub trait VarlinkCallError : varlink :: CallTrait { fn reply_interface_not_found ( & mut self , r#interface : String ) -> varlink :: Result < ( ) > { self . reply_struct ( varlink :: Reply :: error ( "org.varlink.resolver.InterfaceNotFound" , Some ( serde_json :: to_value ( InterfaceNotFound_Args { r#interface } ) . map_err ( minto_cherr ! ( ) ) ? ) ) ) } } impl < 'a > VarlinkCallError for varlink :: Call < 'a > { } # [ allow ( dead_code ) ] # [ derive ( Clone , PartialEq , Debug ) ] pub enum ErrorKind { Io_Error ( :: std :: io :: ErrorKind ) , SerdeJson_Error ( serde_json :: error :: Category ) , Varlink_Error , VarlinkReply_Error ( varlink :: Reply ) , Generic , InterfaceNotFound ( Option < InterfaceNotFound_Args > ) } impl :: std :: fmt :: Display for ErrorKind { fn fmt ( & self , f : & mut :: std :: fmt :: Formatter ) -> :: std :: fmt :: Result { match self { ErrorKind :: Io_Error ( _ ) => write ! ( f , "IO error" ) , ErrorKind :: SerdeJson_Error ( _ ) => { write ! ( f , "(De)Serialization Error" ) } ErrorKind :: Varlink_Error => write ! ( f , "Varlink Error" ) , ErrorKind :: VarlinkReply_Error ( v ) => write ! ( f , "Unknown error reply: '{:#?}'" , v ) , ErrorKind :: Generic => Ok ( ( ) ) , ErrorKind :: InterfaceNotFound ( v ) => write ! ( f , "org.varlink.resolver.InterfaceNotFound: {:#?}" , v ) } } } impl :: std :: error :: Error for ErrorKind { } impl ChainErrorFrom < std :: io :: Error > for ErrorKind { fn chain_error_from ( e : std :: io :: Error , line_filename : Option < ( u32 , & 'static str ) > , ) -> ChainError < Self > { ChainError :: < _ > :: new ( ErrorKind :: Io_Error ( e . kind ( ) ) , Some ( Box :: from ( e ) ) , line_filename ) } } impl ChainErrorFrom < serde_json :: error :: Error > for ErrorKind { fn chain_error_from ( e : serde_json :: error :: Error , line_filename : Option < ( u32 , & 'static str ) > , ) -> ChainError < Self > { ChainError :: < _ > :: new ( ErrorKind :: SerdeJson_Error ( e . classify ( ) ) , Some ( Box :: from ( e ) ) , line_filename , ) } } impl ChainErrorFrom < varlink :: ErrorKind > for ErrorKind { fn chain_error_from ( e : varlink :: ErrorKind , line_filename : Option < ( u32 , & 'static str ) > , ) -> ChainError < Self > { ChainError :: < _ > :: new ( ErrorKind :: Varlink_Error , Some ( Box :: from ( ChainError :: < _ > :: new ( e , None , line_filename , ) ) ) , line_filename , ) } } # [ allow ( dead_code ) ] pub type Result < T > = ChainResult < T , ErrorKind > ; # [ allow ( dead_code ) ] pub type Error = ErrorKind ; impl ChainErrorFrom < varlink :: Reply > for ErrorKind { # [ allow ( unused_variables ) ] fn chain_error_from ( e : varlink :: Reply , line_filename : Option < ( u32 , & 'static str ) > ) -> ChainError < Self > { if varlink :: ErrorKind :: is_error ( & e ) { let e : varlink :: ErrorKind = e . into ( ) ; return into_cherr ! ( e ) ; } match e { varlink :: Reply { error : Some ( ref t ) , .. } if t == "org.varlink.resolver.InterfaceNotFound" => { match e { varlink :: Reply { parameters : Some ( p ) , .. } => match serde_json :: from_value ( p ) { Ok ( v ) => into_cherr ! ( ErrorKind :: InterfaceNotFound ( v ) ) , Err ( _ ) => into_cherr ! ( ErrorKind :: InterfaceNotFound ( None ) ) , } , _ => into_cherr ! ( ErrorKind :: InterfaceNotFound ( None ) ) , } } _ => into_cherr ! ( ErrorKind :: VarlinkReply_Error ( e ) ) , } } } # [ derive ( Serialize , Deserialize , Debug , PartialEq , Clone ) ] pub struct GetInfo_Reply { pub r#vendor : String , pub r#product : String , pub r#version : String , pub r#url : String , pub r#interfaces : Vec < String > , } impl varlink :: VarlinkReply for GetInfo_Reply { } # [ derive ( Serialize , Deserialize , Debug , PartialEq , Clone ) ] pub struct GetInfo_Args { } pub trait Call_GetInfo : VarlinkCallError { fn reply ( & mut self , r#vendor : String , r#product : String , r#version : String , r#url : String , r#interfaces : Vec < String > ) -> varlink :: Result < ( ) > { self . reply_struct ( GetInfo_Reply { r#vendor , r#product , r#version , r#url , r#interfaces } . into ( ) ) } } impl < 'a > Call_GetInfo for varlink :: Call < 'a > { } # [ derive ( Serialize , Deserialize , Debug , PartialEq , Clone ) ] pub struct Resolve_Reply { pub r#address : String , } impl varlink :: VarlinkReply for Resolve_Reply { } # [ derive ( Serialize , Deserialize , Debug , PartialEq , Clone ) ] pub struct Resolve_Args { pub r#interface : String , } pub trait Call_Resolve : VarlinkCallError { fn reply ( & mut self , r#address : String ) -> varlink :: Result < ( ) > { self . reply_struct ( Resolve_Reply { r#address } . into ( ) ) } } impl < 'a > Call_Resolve for varlink :: Call < 'a > { } pub trait VarlinkInterface { fn get_info ( & self , call : & mut Call_GetInfo , ) -> varlink :: Result < ( ) > ; fn resolve ( & self , call : & mut Call_Resolve , r#interface : String ) -> varlink :: Result < ( ) > ; fn call_upgraded ( & self , _call : & mut varlink :: Call , _bufreader : & mut BufRead ) -> varlink :: Result < Vec < u8 >> { Ok ( Vec :: new ( ) ) } } pub trait VarlinkClientInterface { fn get_info ( & mut self , ) -> varlink :: MethodCall < GetInfo_Args , GetInfo_Reply , Error > ; fn resolve ( & mut self , r#interface : String ) -> varlink :: MethodCall < Resolve_Args , Resolve_Reply , Error > ; } # [ allow ( dead_code ) ] pub struct VarlinkClient { connection : Arc < RwLock < varlink :: Connection >> , } impl VarlinkClient { # [ allow ( dead_code ) ] pub fn new ( connection : Arc < RwLock < varlink :: Connection >> ) -> Self { VarlinkClient { connection , } } } impl VarlinkClientInterface for VarlinkClient { fn get_info ( & mut self , ) -> varlink :: MethodCall < GetInfo_Args , GetInfo_Reply , Error > { varlink :: MethodCall :: < GetInfo_Args , GetInfo_Reply , Error > :: new ( self . connection . clone ( ) , "org.varlink.resolver.GetInfo" , GetInfo_Args { } ) } fn resolve ( & mut self , r#interface : String ) -> varlink :: MethodCall < Resolve_Args , Resolve_Reply , Error > { varlink :: MethodCall :: < Resolve_Args , Resolve_Reply , Error > :: new ( self . connection . clone ( ) , "org.varlink.resolver.Resolve" , Resolve_Args { r#interface } ) } } # [ allow ( dead_code ) ] pub struct VarlinkInterfaceProxy { inner : Box < VarlinkInterface + Send + Sync > , } # [ allow ( dead_code ) ] pub fn new ( inner : Box < VarlinkInterface + Send + Sync > ) -> VarlinkInterfaceProxy { VarlinkInterfaceProxy { inner } } impl varlink :: Interface for VarlinkInterfaceProxy { fn get_description ( & self ) -> & 'static str { "# Interface to resolve reverse-domain interface names to\n# service adresses\ninterface org.varlink.resolver\n\n# Get a list of all resolvable interfaces and information\n# about the resolver's identity.\nmethod GetInfo() -> (\n vendor: string,\n product: string,\n version: string,\n url: string,\n interfaces: []string\n)\n\n# Resolve an interface name to a registered varlink service address\nmethod Resolve(interface: string) -> (address: string)\n\nerror InterfaceNotFound (interface: string)\n" } fn get_name ( & self ) -> & 'static str { "org.varlink.resolver" } fn call_upgraded ( & self , call : & mut varlink :: Call , bufreader : & mut BufRead ) -> varlink :: Result < Vec < u8 >> { self . inner . call_upgraded ( call , bufreader ) } fn call ( & self , call : & mut varlink :: Call ) -> varlink :: Result < ( ) > { let req = call . request . unwrap ( ) ; match req . method . as_ref ( ) { "org.varlink.resolver.GetInfo" => self . inner . get_info ( call as & mut Call_GetInfo ) , "org.varlink.resolver.Resolve" => { if let Some ( args ) = req . parameters . clone ( ) { let args : Resolve_Args = match serde_json :: from_value ( args ) { Ok ( v ) => v , Err ( e ) => { let es = format ! ( "{}" , e ) ; let _ = call . reply_invalid_parameter ( es . clone ( ) ) ; return Err ( into_cherr ! ( varlink :: ErrorKind :: SerdeJsonDe ( es ) ) ) ; } } ; self . inner . resolve ( call as & mut Call_Resolve , args . r#interface ) } else { call . reply_invalid_parameter ( "parameters" . into ( ) ) } } , m => { call . reply_method_not_found ( String :: from ( m ) ) } } } } [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `dyn`: `dyn VarlinkInterface + Send + Sync` [INFO] [stderr] [INFO] [stderr] warning: trait objects without an explicit `dyn` are deprecated [INFO] [stderr] --> /opt/crater/target/debug/build/varlink_stdinterfaces-54f76819d3207c73/out/org.varlink.resolver.rs:1:6631 [INFO] [stderr] | [INFO] [stderr] 1 | use chainerror :: * ; use serde_derive :: { { Deserialize , Serialize } } ; use serde_json ; use std :: io :: BufRead ; use std :: sync :: { { Arc , RwLock } } ; use varlink :: { { self , CallTrait } } ; # [ derive ( Serialize , Deserialize , Debug , PartialEq , Clone ) ] pub struct InterfaceNotFound_Args { pub r#interface : String , } pub trait VarlinkCallError : varlink :: CallTrait { fn reply_interface_not_found ( & mut self , r#interface : String ) -> varlink :: Result < ( ) > { self . reply_struct ( varlink :: Reply :: error ( "org.varlink.resolver.InterfaceNotFound" , Some ( serde_json :: to_value ( InterfaceNotFound_Args { r#interface } ) . map_err ( minto_cherr ! ( ) ) ? ) ) ) } } impl < 'a > VarlinkCallError for varlink :: Call < 'a > { } # [ allow ( dead_code ) ] # [ derive ( Clone , PartialEq , Debug ) ] pub enum ErrorKind { Io_Error ( :: std :: io :: ErrorKind ) , SerdeJson_Error ( serde_json :: error :: Category ) , Varlink_Error , VarlinkReply_Error ( varlink :: Reply ) , Generic , InterfaceNotFound ( Option < InterfaceNotFound_Args > ) } impl :: std :: fmt :: Display for ErrorKind { fn fmt ( & self , f : & mut :: std :: fmt :: Formatter ) -> :: std :: fmt :: Result { match self { ErrorKind :: Io_Error ( _ ) => write ! ( f , "IO error" ) , ErrorKind :: SerdeJson_Error ( _ ) => { write ! ( f , "(De)Serialization Error" ) } ErrorKind :: Varlink_Error => write ! ( f , "Varlink Error" ) , ErrorKind :: VarlinkReply_Error ( v ) => write ! ( f , "Unknown error reply: '{:#?}'" , v ) , ErrorKind :: Generic => Ok ( ( ) ) , ErrorKind :: InterfaceNotFound ( v ) => write ! ( f , "org.varlink.resolver.InterfaceNotFound: {:#?}" , v ) } } } impl :: std :: error :: Error for ErrorKind { } impl ChainErrorFrom < std :: io :: Error > for ErrorKind { fn chain_error_from ( e : std :: io :: Error , line_filename : Option < ( u32 , & 'static str ) > , ) -> ChainError < Self > { ChainError :: < _ > :: new ( ErrorKind :: Io_Error ( e . kind ( ) ) , Some ( Box :: from ( e ) ) , line_filename ) } } impl ChainErrorFrom < serde_json :: error :: Error > for ErrorKind { fn chain_error_from ( e : serde_json :: error :: Error , line_filename : Option < ( u32 , & 'static str ) > , ) -> ChainError < Self > { ChainError :: < _ > :: new ( ErrorKind :: SerdeJson_Error ( e . classify ( ) ) , Some ( Box :: from ( e ) ) , line_filename , ) } } impl ChainErrorFrom < varlink :: ErrorKind > for ErrorKind { fn chain_error_from ( e : varlink :: ErrorKind , line_filename : Option < ( u32 , & 'static str ) > , ) -> ChainError < Self > { ChainError :: < _ > :: new ( ErrorKind :: Varlink_Error , Some ( Box :: from ( ChainError :: < _ > :: new ( e , None , line_filename , ) ) ) , line_filename , ) } } # [ allow ( dead_code ) ] pub type Result < T > = ChainResult < T , ErrorKind > ; # [ allow ( dead_code ) ] pub type Error = ErrorKind ; impl ChainErrorFrom < varlink :: Reply > for ErrorKind { # [ allow ( unused_variables ) ] fn chain_error_from ( e : varlink :: Reply , line_filename : Option < ( u32 , & 'static str ) > ) -> ChainError < Self > { if varlink :: ErrorKind :: is_error ( & e ) { let e : varlink :: ErrorKind = e . into ( ) ; return into_cherr ! ( e ) ; } match e { varlink :: Reply { error : Some ( ref t ) , .. } if t == "org.varlink.resolver.InterfaceNotFound" => { match e { varlink :: Reply { parameters : Some ( p ) , .. } => match serde_json :: from_value ( p ) { Ok ( v ) => into_cherr ! ( ErrorKind :: InterfaceNotFound ( v ) ) , Err ( _ ) => into_cherr ! ( ErrorKind :: InterfaceNotFound ( None ) ) , } , _ => into_cherr ! ( ErrorKind :: InterfaceNotFound ( None ) ) , } } _ => into_cherr ! ( ErrorKind :: VarlinkReply_Error ( e ) ) , } } } # [ derive ( Serialize , Deserialize , Debug , PartialEq , Clone ) ] pub struct GetInfo_Reply { pub r#vendor : String , pub r#product : String , pub r#version : String , pub r#url : String , pub r#interfaces : Vec < String > , } impl varlink :: VarlinkReply for GetInfo_Reply { } # [ derive ( Serialize , Deserialize , Debug , PartialEq , Clone ) ] pub struct GetInfo_Args { } pub trait Call_GetInfo : VarlinkCallError { fn reply ( & mut self , r#vendor : String , r#product : String , r#version : String , r#url : String , r#interfaces : Vec < String > ) -> varlink :: Result < ( ) > { self . reply_struct ( GetInfo_Reply { r#vendor , r#product , r#version , r#url , r#interfaces } . into ( ) ) } } impl < 'a > Call_GetInfo for varlink :: Call < 'a > { } # [ derive ( Serialize , Deserialize , Debug , PartialEq , Clone ) ] pub struct Resolve_Reply { pub r#address : String , } impl varlink :: VarlinkReply for Resolve_Reply { } # [ derive ( Serialize , Deserialize , Debug , PartialEq , Clone ) ] pub struct Resolve_Args { pub r#interface : String , } pub trait Call_Resolve : VarlinkCallError { fn reply ( & mut self , r#address : String ) -> varlink :: Result < ( ) > { self . reply_struct ( Resolve_Reply { r#address } . into ( ) ) } } impl < 'a > Call_Resolve for varlink :: Call < 'a > { } pub trait VarlinkInterface { fn get_info ( & self , call : & mut Call_GetInfo , ) -> varlink :: Result < ( ) > ; fn resolve ( & self , call : & mut Call_Resolve , r#interface : String ) -> varlink :: Result < ( ) > ; fn call_upgraded ( & self , _call : & mut varlink :: Call , _bufreader : & mut BufRead ) -> varlink :: Result < Vec < u8 >> { Ok ( Vec :: new ( ) ) } } pub trait VarlinkClientInterface { fn get_info ( & mut self , ) -> varlink :: MethodCall < GetInfo_Args , GetInfo_Reply , Error > ; fn resolve ( & mut self , r#interface : String ) -> varlink :: MethodCall < Resolve_Args , Resolve_Reply , Error > ; } # [ allow ( dead_code ) ] pub struct VarlinkClient { connection : Arc < RwLock < varlink :: Connection >> , } impl VarlinkClient { # [ allow ( dead_code ) ] pub fn new ( connection : Arc < RwLock < varlink :: Connection >> ) -> Self { VarlinkClient { connection , } } } impl VarlinkClientInterface for VarlinkClient { fn get_info ( & mut self , ) -> varlink :: MethodCall < GetInfo_Args , GetInfo_Reply , Error > { varlink :: MethodCall :: < GetInfo_Args , GetInfo_Reply , Error > :: new ( self . connection . clone ( ) , "org.varlink.resolver.GetInfo" , GetInfo_Args { } ) } fn resolve ( & mut self , r#interface : String ) -> varlink :: MethodCall < Resolve_Args , Resolve_Reply , Error > { varlink :: MethodCall :: < Resolve_Args , Resolve_Reply , Error > :: new ( self . connection . clone ( ) , "org.varlink.resolver.Resolve" , Resolve_Args { r#interface } ) } } # [ allow ( dead_code ) ] pub struct VarlinkInterfaceProxy { inner : Box < VarlinkInterface + Send + Sync > , } # [ allow ( dead_code ) ] pub fn new ( inner : Box < VarlinkInterface + Send + Sync > ) -> VarlinkInterfaceProxy { VarlinkInterfaceProxy { inner } } impl varlink :: Interface for VarlinkInterfaceProxy { fn get_description ( & self ) -> & 'static str { "# Interface to resolve reverse-domain interface names to\n# service adresses\ninterface org.varlink.resolver\n\n# Get a list of all resolvable interfaces and information\n# about the resolver's identity.\nmethod GetInfo() -> (\n vendor: string,\n product: string,\n version: string,\n url: string,\n interfaces: []string\n)\n\n# Resolve an interface name to a registered varlink service address\nmethod Resolve(interface: string) -> (address: string)\n\nerror InterfaceNotFound (interface: string)\n" } fn get_name ( & self ) -> & 'static str { "org.varlink.resolver" } fn call_upgraded ( & self , call : & mut varlink :: Call , bufreader : & mut BufRead ) -> varlink :: Result < Vec < u8 >> { self . inner . call_upgraded ( call , bufreader ) } fn call ( & self , call : & mut varlink :: Call ) -> varlink :: Result < ( ) > { let req = call . request . unwrap ( ) ; match req . method . as_ref ( ) { "org.varlink.resolver.GetInfo" => self . inner . get_info ( call as & mut Call_GetInfo ) , "org.varlink.resolver.Resolve" => { if let Some ( args ) = req . parameters . clone ( ) { let args : Resolve_Args = match serde_json :: from_value ( args ) { Ok ( v ) => v , Err ( e ) => { let es = format ! ( "{}" , e ) ; let _ = call . reply_invalid_parameter ( es . clone ( ) ) ; return Err ( into_cherr ! ( varlink :: ErrorKind :: SerdeJsonDe ( es ) ) ) ; } } ; self . inner . resolve ( call as & mut Call_Resolve , args . r#interface ) } else { call . reply_invalid_parameter ( "parameters" . into ( ) ) } } , m => { call . reply_method_not_found ( String :: from ( m ) ) } } } } [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `dyn`: `dyn VarlinkInterface + Send + Sync` [INFO] [stderr] [INFO] [stderr] warning: trait objects without an explicit `dyn` are deprecated [INFO] [stderr] --> /opt/crater/target/debug/build/varlink_stdinterfaces-54f76819d3207c73/out/org.varlink.resolver.rs:1:7483 [INFO] [stderr] | [INFO] [stderr] 1 | use chainerror :: * ; use serde_derive :: { { Deserialize , Serialize } } ; use serde_json ; use std :: io :: BufRead ; use std :: sync :: { { Arc , RwLock } } ; use varlink :: { { self , CallTrait } } ; # [ derive ( Serialize , Deserialize , Debug , PartialEq , Clone ) ] pub struct InterfaceNotFound_Args { pub r#interface : String , } pub trait VarlinkCallError : varlink :: CallTrait { fn reply_interface_not_found ( & mut self , r#interface : String ) -> varlink :: Result < ( ) > { self . reply_struct ( varlink :: Reply :: error ( "org.varlink.resolver.InterfaceNotFound" , Some ( serde_json :: to_value ( InterfaceNotFound_Args { r#interface } ) . map_err ( minto_cherr ! ( ) ) ? ) ) ) } } impl < 'a > VarlinkCallError for varlink :: Call < 'a > { } # [ allow ( dead_code ) ] # [ derive ( Clone , PartialEq , Debug ) ] pub enum ErrorKind { Io_Error ( :: std :: io :: ErrorKind ) , SerdeJson_Error ( serde_json :: error :: Category ) , Varlink_Error , VarlinkReply_Error ( varlink :: Reply ) , Generic , InterfaceNotFound ( Option < InterfaceNotFound_Args > ) } impl :: std :: fmt :: Display for ErrorKind { fn fmt ( & self , f : & mut :: std :: fmt :: Formatter ) -> :: std :: fmt :: Result { match self { ErrorKind :: Io_Error ( _ ) => write ! ( f , "IO error" ) , ErrorKind :: SerdeJson_Error ( _ ) => { write ! ( f , "(De)Serialization Error" ) } ErrorKind :: Varlink_Error => write ! ( f , "Varlink Error" ) , ErrorKind :: VarlinkReply_Error ( v ) => write ! ( f , "Unknown error reply: '{:#?}'" , v ) , ErrorKind :: Generic => Ok ( ( ) ) , ErrorKind :: InterfaceNotFound ( v ) => write ! ( f , "org.varlink.resolver.InterfaceNotFound: {:#?}" , v ) } } } impl :: std :: error :: Error for ErrorKind { } impl ChainErrorFrom < std :: io :: Error > for ErrorKind { fn chain_error_from ( e : std :: io :: Error , line_filename : Option < ( u32 , & 'static str ) > , ) -> ChainError < Self > { ChainError :: < _ > :: new ( ErrorKind :: Io_Error ( e . kind ( ) ) , Some ( Box :: from ( e ) ) , line_filename ) } } impl ChainErrorFrom < serde_json :: error :: Error > for ErrorKind { fn chain_error_from ( e : serde_json :: error :: Error , line_filename : Option < ( u32 , & 'static str ) > , ) -> ChainError < Self > { ChainError :: < _ > :: new ( ErrorKind :: SerdeJson_Error ( e . classify ( ) ) , Some ( Box :: from ( e ) ) , line_filename , ) } } impl ChainErrorFrom < varlink :: ErrorKind > for ErrorKind { fn chain_error_from ( e : varlink :: ErrorKind , line_filename : Option < ( u32 , & 'static str ) > , ) -> ChainError < Self > { ChainError :: < _ > :: new ( ErrorKind :: Varlink_Error , Some ( Box :: from ( ChainError :: < _ > :: new ( e , None , line_filename , ) ) ) , line_filename , ) } } # [ allow ( dead_code ) ] pub type Result < T > = ChainResult < T , ErrorKind > ; # [ allow ( dead_code ) ] pub type Error = ErrorKind ; impl ChainErrorFrom < varlink :: Reply > for ErrorKind { # [ allow ( unused_variables ) ] fn chain_error_from ( e : varlink :: Reply , line_filename : Option < ( u32 , & 'static str ) > ) -> ChainError < Self > { if varlink :: ErrorKind :: is_error ( & e ) { let e : varlink :: ErrorKind = e . into ( ) ; return into_cherr ! ( e ) ; } match e { varlink :: Reply { error : Some ( ref t ) , .. } if t == "org.varlink.resolver.InterfaceNotFound" => { match e { varlink :: Reply { parameters : Some ( p ) , .. } => match serde_json :: from_value ( p ) { Ok ( v ) => into_cherr ! ( ErrorKind :: InterfaceNotFound ( v ) ) , Err ( _ ) => into_cherr ! ( ErrorKind :: InterfaceNotFound ( None ) ) , } , _ => into_cherr ! ( ErrorKind :: InterfaceNotFound ( None ) ) , } } _ => into_cherr ! ( ErrorKind :: VarlinkReply_Error ( e ) ) , } } } # [ derive ( Serialize , Deserialize , Debug , PartialEq , Clone ) ] pub struct GetInfo_Reply { pub r#vendor : String , pub r#product : String , pub r#version : String , pub r#url : String , pub r#interfaces : Vec < String > , } impl varlink :: VarlinkReply for GetInfo_Reply { } # [ derive ( Serialize , Deserialize , Debug , PartialEq , Clone ) ] pub struct GetInfo_Args { } pub trait Call_GetInfo : VarlinkCallError { fn reply ( & mut self , r#vendor : String , r#product : String , r#version : String , r#url : String , r#interfaces : Vec < String > ) -> varlink :: Result < ( ) > { self . reply_struct ( GetInfo_Reply { r#vendor , r#product , r#version , r#url , r#interfaces } . into ( ) ) } } impl < 'a > Call_GetInfo for varlink :: Call < 'a > { } # [ derive ( Serialize , Deserialize , Debug , PartialEq , Clone ) ] pub struct Resolve_Reply { pub r#address : String , } impl varlink :: VarlinkReply for Resolve_Reply { } # [ derive ( Serialize , Deserialize , Debug , PartialEq , Clone ) ] pub struct Resolve_Args { pub r#interface : String , } pub trait Call_Resolve : VarlinkCallError { fn reply ( & mut self , r#address : String ) -> varlink :: Result < ( ) > { self . reply_struct ( Resolve_Reply { r#address } . into ( ) ) } } impl < 'a > Call_Resolve for varlink :: Call < 'a > { } pub trait VarlinkInterface { fn get_info ( & self , call : & mut Call_GetInfo , ) -> varlink :: Result < ( ) > ; fn resolve ( & self , call : & mut Call_Resolve , r#interface : String ) -> varlink :: Result < ( ) > ; fn call_upgraded ( & self , _call : & mut varlink :: Call , _bufreader : & mut BufRead ) -> varlink :: Result < Vec < u8 >> { Ok ( Vec :: new ( ) ) } } pub trait VarlinkClientInterface { fn get_info ( & mut self , ) -> varlink :: MethodCall < GetInfo_Args , GetInfo_Reply , Error > ; fn resolve ( & mut self , r#interface : String ) -> varlink :: MethodCall < Resolve_Args , Resolve_Reply , Error > ; } # [ allow ( dead_code ) ] pub struct VarlinkClient { connection : Arc < RwLock < varlink :: Connection >> , } impl VarlinkClient { # [ allow ( dead_code ) ] pub fn new ( connection : Arc < RwLock < varlink :: Connection >> ) -> Self { VarlinkClient { connection , } } } impl VarlinkClientInterface for VarlinkClient { fn get_info ( & mut self , ) -> varlink :: MethodCall < GetInfo_Args , GetInfo_Reply , Error > { varlink :: MethodCall :: < GetInfo_Args , GetInfo_Reply , Error > :: new ( self . connection . clone ( ) , "org.varlink.resolver.GetInfo" , GetInfo_Args { } ) } fn resolve ( & mut self , r#interface : String ) -> varlink :: MethodCall < Resolve_Args , Resolve_Reply , Error > { varlink :: MethodCall :: < Resolve_Args , Resolve_Reply , Error > :: new ( self . connection . clone ( ) , "org.varlink.resolver.Resolve" , Resolve_Args { r#interface } ) } } # [ allow ( dead_code ) ] pub struct VarlinkInterfaceProxy { inner : Box < VarlinkInterface + Send + Sync > , } # [ allow ( dead_code ) ] pub fn new ( inner : Box < VarlinkInterface + Send + Sync > ) -> VarlinkInterfaceProxy { VarlinkInterfaceProxy { inner } } impl varlink :: Interface for VarlinkInterfaceProxy { fn get_description ( & self ) -> & 'static str { "# Interface to resolve reverse-domain interface names to\n# service adresses\ninterface org.varlink.resolver\n\n# Get a list of all resolvable interfaces and information\n# about the resolver's identity.\nmethod GetInfo() -> (\n vendor: string,\n product: string,\n version: string,\n url: string,\n interfaces: []string\n)\n\n# Resolve an interface name to a registered varlink service address\nmethod Resolve(interface: string) -> (address: string)\n\nerror InterfaceNotFound (interface: string)\n" } fn get_name ( & self ) -> & 'static str { "org.varlink.resolver" } fn call_upgraded ( & self , call : & mut varlink :: Call , bufreader : & mut BufRead ) -> varlink :: Result < Vec < u8 >> { self . inner . call_upgraded ( call , bufreader ) } fn call ( & self , call : & mut varlink :: Call ) -> varlink :: Result < ( ) > { let req = call . request . unwrap ( ) ; match req . method . as_ref ( ) { "org.varlink.resolver.GetInfo" => self . inner . get_info ( call as & mut Call_GetInfo ) , "org.varlink.resolver.Resolve" => { if let Some ( args ) = req . parameters . clone ( ) { let args : Resolve_Args = match serde_json :: from_value ( args ) { Ok ( v ) => v , Err ( e ) => { let es = format ! ( "{}" , e ) ; let _ = call . reply_invalid_parameter ( es . clone ( ) ) ; return Err ( into_cherr ! ( varlink :: ErrorKind :: SerdeJsonDe ( es ) ) ) ; } } ; self . inner . resolve ( call as & mut Call_Resolve , args . r#interface ) } else { call . reply_invalid_parameter ( "parameters" . into ( ) ) } } , m => { call . reply_method_not_found ( String :: from ( m ) ) } } } } [INFO] [stderr] | ^^^^^^^ help: use `dyn`: `dyn BufRead` [INFO] [stderr] [INFO] [stderr] warning: trait objects without an explicit `dyn` are deprecated [INFO] [stderr] --> /opt/crater/target/debug/build/varlink_stdinterfaces-54f76819d3207c73/out/org.varlink.resolver.rs:1:7811 [INFO] [stderr] | [INFO] [stderr] 1 | use chainerror :: * ; use serde_derive :: { { Deserialize , Serialize } } ; use serde_json ; use std :: io :: BufRead ; use std :: sync :: { { Arc , RwLock } } ; use varlink :: { { self , CallTrait } } ; # [ derive ( Serialize , Deserialize , Debug , PartialEq , Clone ) ] pub struct InterfaceNotFound_Args { pub r#interface : String , } pub trait VarlinkCallError : varlink :: CallTrait { fn reply_interface_not_found ( & mut self , r#interface : String ) -> varlink :: Result < ( ) > { self . reply_struct ( varlink :: Reply :: error ( "org.varlink.resolver.InterfaceNotFound" , Some ( serde_json :: to_value ( InterfaceNotFound_Args { r#interface } ) . map_err ( minto_cherr ! ( ) ) ? ) ) ) } } impl < 'a > VarlinkCallError for varlink :: Call < 'a > { } # [ allow ( dead_code ) ] # [ derive ( Clone , PartialEq , Debug ) ] pub enum ErrorKind { Io_Error ( :: std :: io :: ErrorKind ) , SerdeJson_Error ( serde_json :: error :: Category ) , Varlink_Error , VarlinkReply_Error ( varlink :: Reply ) , Generic , InterfaceNotFound ( Option < InterfaceNotFound_Args > ) } impl :: std :: fmt :: Display for ErrorKind { fn fmt ( & self , f : & mut :: std :: fmt :: Formatter ) -> :: std :: fmt :: Result { match self { ErrorKind :: Io_Error ( _ ) => write ! ( f , "IO error" ) , ErrorKind :: SerdeJson_Error ( _ ) => { write ! ( f , "(De)Serialization Error" ) } ErrorKind :: Varlink_Error => write ! ( f , "Varlink Error" ) , ErrorKind :: VarlinkReply_Error ( v ) => write ! ( f , "Unknown error reply: '{:#?}'" , v ) , ErrorKind :: Generic => Ok ( ( ) ) , ErrorKind :: InterfaceNotFound ( v ) => write ! ( f , "org.varlink.resolver.InterfaceNotFound: {:#?}" , v ) } } } impl :: std :: error :: Error for ErrorKind { } impl ChainErrorFrom < std :: io :: Error > for ErrorKind { fn chain_error_from ( e : std :: io :: Error , line_filename : Option < ( u32 , & 'static str ) > , ) -> ChainError < Self > { ChainError :: < _ > :: new ( ErrorKind :: Io_Error ( e . kind ( ) ) , Some ( Box :: from ( e ) ) , line_filename ) } } impl ChainErrorFrom < serde_json :: error :: Error > for ErrorKind { fn chain_error_from ( e : serde_json :: error :: Error , line_filename : Option < ( u32 , & 'static str ) > , ) -> ChainError < Self > { ChainError :: < _ > :: new ( ErrorKind :: SerdeJson_Error ( e . classify ( ) ) , Some ( Box :: from ( e ) ) , line_filename , ) } } impl ChainErrorFrom < varlink :: ErrorKind > for ErrorKind { fn chain_error_from ( e : varlink :: ErrorKind , line_filename : Option < ( u32 , & 'static str ) > , ) -> ChainError < Self > { ChainError :: < _ > :: new ( ErrorKind :: Varlink_Error , Some ( Box :: from ( ChainError :: < _ > :: new ( e , None , line_filename , ) ) ) , line_filename , ) } } # [ allow ( dead_code ) ] pub type Result < T > = ChainResult < T , ErrorKind > ; # [ allow ( dead_code ) ] pub type Error = ErrorKind ; impl ChainErrorFrom < varlink :: Reply > for ErrorKind { # [ allow ( unused_variables ) ] fn chain_error_from ( e : varlink :: Reply , line_filename : Option < ( u32 , & 'static str ) > ) -> ChainError < Self > { if varlink :: ErrorKind :: is_error ( & e ) { let e : varlink :: ErrorKind = e . into ( ) ; return into_cherr ! ( e ) ; } match e { varlink :: Reply { error : Some ( ref t ) , .. } if t == "org.varlink.resolver.InterfaceNotFound" => { match e { varlink :: Reply { parameters : Some ( p ) , .. } => match serde_json :: from_value ( p ) { Ok ( v ) => into_cherr ! ( ErrorKind :: InterfaceNotFound ( v ) ) , Err ( _ ) => into_cherr ! ( ErrorKind :: InterfaceNotFound ( None ) ) , } , _ => into_cherr ! ( ErrorKind :: InterfaceNotFound ( None ) ) , } } _ => into_cherr ! ( ErrorKind :: VarlinkReply_Error ( e ) ) , } } } # [ derive ( Serialize , Deserialize , Debug , PartialEq , Clone ) ] pub struct GetInfo_Reply { pub r#vendor : String , pub r#product : String , pub r#version : String , pub r#url : String , pub r#interfaces : Vec < String > , } impl varlink :: VarlinkReply for GetInfo_Reply { } # [ derive ( Serialize , Deserialize , Debug , PartialEq , Clone ) ] pub struct GetInfo_Args { } pub trait Call_GetInfo : VarlinkCallError { fn reply ( & mut self , r#vendor : String , r#product : String , r#version : String , r#url : String , r#interfaces : Vec < String > ) -> varlink :: Result < ( ) > { self . reply_struct ( GetInfo_Reply { r#vendor , r#product , r#version , r#url , r#interfaces } . into ( ) ) } } impl < 'a > Call_GetInfo for varlink :: Call < 'a > { } # [ derive ( Serialize , Deserialize , Debug , PartialEq , Clone ) ] pub struct Resolve_Reply { pub r#address : String , } impl varlink :: VarlinkReply for Resolve_Reply { } # [ derive ( Serialize , Deserialize , Debug , PartialEq , Clone ) ] pub struct Resolve_Args { pub r#interface : String , } pub trait Call_Resolve : VarlinkCallError { fn reply ( & mut self , r#address : String ) -> varlink :: Result < ( ) > { self . reply_struct ( Resolve_Reply { r#address } . into ( ) ) } } impl < 'a > Call_Resolve for varlink :: Call < 'a > { } pub trait VarlinkInterface { fn get_info ( & self , call : & mut Call_GetInfo , ) -> varlink :: Result < ( ) > ; fn resolve ( & self , call : & mut Call_Resolve , r#interface : String ) -> varlink :: Result < ( ) > ; fn call_upgraded ( & self , _call : & mut varlink :: Call , _bufreader : & mut BufRead ) -> varlink :: Result < Vec < u8 >> { Ok ( Vec :: new ( ) ) } } pub trait VarlinkClientInterface { fn get_info ( & mut self , ) -> varlink :: MethodCall < GetInfo_Args , GetInfo_Reply , Error > ; fn resolve ( & mut self , r#interface : String ) -> varlink :: MethodCall < Resolve_Args , Resolve_Reply , Error > ; } # [ allow ( dead_code ) ] pub struct VarlinkClient { connection : Arc < RwLock < varlink :: Connection >> , } impl VarlinkClient { # [ allow ( dead_code ) ] pub fn new ( connection : Arc < RwLock < varlink :: Connection >> ) -> Self { VarlinkClient { connection , } } } impl VarlinkClientInterface for VarlinkClient { fn get_info ( & mut self , ) -> varlink :: MethodCall < GetInfo_Args , GetInfo_Reply , Error > { varlink :: MethodCall :: < GetInfo_Args , GetInfo_Reply , Error > :: new ( self . connection . clone ( ) , "org.varlink.resolver.GetInfo" , GetInfo_Args { } ) } fn resolve ( & mut self , r#interface : String ) -> varlink :: MethodCall < Resolve_Args , Resolve_Reply , Error > { varlink :: MethodCall :: < Resolve_Args , Resolve_Reply , Error > :: new ( self . connection . clone ( ) , "org.varlink.resolver.Resolve" , Resolve_Args { r#interface } ) } } # [ allow ( dead_code ) ] pub struct VarlinkInterfaceProxy { inner : Box < VarlinkInterface + Send + Sync > , } # [ allow ( dead_code ) ] pub fn new ( inner : Box < VarlinkInterface + Send + Sync > ) -> VarlinkInterfaceProxy { VarlinkInterfaceProxy { inner } } impl varlink :: Interface for VarlinkInterfaceProxy { fn get_description ( & self ) -> & 'static str { "# Interface to resolve reverse-domain interface names to\n# service adresses\ninterface org.varlink.resolver\n\n# Get a list of all resolvable interfaces and information\n# about the resolver's identity.\nmethod GetInfo() -> (\n vendor: string,\n product: string,\n version: string,\n url: string,\n interfaces: []string\n)\n\n# Resolve an interface name to a registered varlink service address\nmethod Resolve(interface: string) -> (address: string)\n\nerror InterfaceNotFound (interface: string)\n" } fn get_name ( & self ) -> & 'static str { "org.varlink.resolver" } fn call_upgraded ( & self , call : & mut varlink :: Call , bufreader : & mut BufRead ) -> varlink :: Result < Vec < u8 >> { self . inner . call_upgraded ( call , bufreader ) } fn call ( & self , call : & mut varlink :: Call ) -> varlink :: Result < ( ) > { let req = call . request . unwrap ( ) ; match req . method . as_ref ( ) { "org.varlink.resolver.GetInfo" => self . inner . get_info ( call as & mut Call_GetInfo ) , "org.varlink.resolver.Resolve" => { if let Some ( args ) = req . parameters . clone ( ) { let args : Resolve_Args = match serde_json :: from_value ( args ) { Ok ( v ) => v , Err ( e ) => { let es = format ! ( "{}" , e ) ; let _ = call . reply_invalid_parameter ( es . clone ( ) ) ; return Err ( into_cherr ! ( varlink :: ErrorKind :: SerdeJsonDe ( es ) ) ) ; } } ; self . inner . resolve ( call as & mut Call_Resolve , args . r#interface ) } else { call . reply_invalid_parameter ( "parameters" . into ( ) ) } } , m => { call . reply_method_not_found ( String :: from ( m ) ) } } } } [INFO] [stderr] | ^^^^^^^^^^^^ help: use `dyn`: `dyn Call_GetInfo` [INFO] [stderr] [INFO] [stderr] warning: trait objects without an explicit `dyn` are deprecated [INFO] [stderr] --> /opt/crater/target/debug/build/varlink_stdinterfaces-54f76819d3207c73/out/org.varlink.resolver.rs:1:8232 [INFO] [stderr] | [INFO] [stderr] 1 | use chainerror :: * ; use serde_derive :: { { Deserialize , Serialize } } ; use serde_json ; use std :: io :: BufRead ; use std :: sync :: { { Arc , RwLock } } ; use varlink :: { { self , CallTrait } } ; # [ derive ( Serialize , Deserialize , Debug , PartialEq , Clone ) ] pub struct InterfaceNotFound_Args { pub r#interface : String , } pub trait VarlinkCallError : varlink :: CallTrait { fn reply_interface_not_found ( & mut self , r#interface : String ) -> varlink :: Result < ( ) > { self . reply_struct ( varlink :: Reply :: error ( "org.varlink.resolver.InterfaceNotFound" , Some ( serde_json :: to_value ( InterfaceNotFound_Args { r#interface } ) . map_err ( minto_cherr ! ( ) ) ? ) ) ) } } impl < 'a > VarlinkCallError for varlink :: Call < 'a > { } # [ allow ( dead_code ) ] # [ derive ( Clone , PartialEq , Debug ) ] pub enum ErrorKind { Io_Error ( :: std :: io :: ErrorKind ) , SerdeJson_Error ( serde_json :: error :: Category ) , Varlink_Error , VarlinkReply_Error ( varlink :: Reply ) , Generic , InterfaceNotFound ( Option < InterfaceNotFound_Args > ) } impl :: std :: fmt :: Display for ErrorKind { fn fmt ( & self , f : & mut :: std :: fmt :: Formatter ) -> :: std :: fmt :: Result { match self { ErrorKind :: Io_Error ( _ ) => write ! ( f , "IO error" ) , ErrorKind :: SerdeJson_Error ( _ ) => { write ! ( f , "(De)Serialization Error" ) } ErrorKind :: Varlink_Error => write ! ( f , "Varlink Error" ) , ErrorKind :: VarlinkReply_Error ( v ) => write ! ( f , "Unknown error reply: '{:#?}'" , v ) , ErrorKind :: Generic => Ok ( ( ) ) , ErrorKind :: InterfaceNotFound ( v ) => write ! ( f , "org.varlink.resolver.InterfaceNotFound: {:#?}" , v ) } } } impl :: std :: error :: Error for ErrorKind { } impl ChainErrorFrom < std :: io :: Error > for ErrorKind { fn chain_error_from ( e : std :: io :: Error , line_filename : Option < ( u32 , & 'static str ) > , ) -> ChainError < Self > { ChainError :: < _ > :: new ( ErrorKind :: Io_Error ( e . kind ( ) ) , Some ( Box :: from ( e ) ) , line_filename ) } } impl ChainErrorFrom < serde_json :: error :: Error > for ErrorKind { fn chain_error_from ( e : serde_json :: error :: Error , line_filename : Option < ( u32 , & 'static str ) > , ) -> ChainError < Self > { ChainError :: < _ > :: new ( ErrorKind :: SerdeJson_Error ( e . classify ( ) ) , Some ( Box :: from ( e ) ) , line_filename , ) } } impl ChainErrorFrom < varlink :: ErrorKind > for ErrorKind { fn chain_error_from ( e : varlink :: ErrorKind , line_filename : Option < ( u32 , & 'static str ) > , ) -> ChainError < Self > { ChainError :: < _ > :: new ( ErrorKind :: Varlink_Error , Some ( Box :: from ( ChainError :: < _ > :: new ( e , None , line_filename , ) ) ) , line_filename , ) } } # [ allow ( dead_code ) ] pub type Result < T > = ChainResult < T , ErrorKind > ; # [ allow ( dead_code ) ] pub type Error = ErrorKind ; impl ChainErrorFrom < varlink :: Reply > for ErrorKind { # [ allow ( unused_variables ) ] fn chain_error_from ( e : varlink :: Reply , line_filename : Option < ( u32 , & 'static str ) > ) -> ChainError < Self > { if varlink :: ErrorKind :: is_error ( & e ) { let e : varlink :: ErrorKind = e . into ( ) ; return into_cherr ! ( e ) ; } match e { varlink :: Reply { error : Some ( ref t ) , .. } if t == "org.varlink.resolver.InterfaceNotFound" => { match e { varlink :: Reply { parameters : Some ( p ) , .. } => match serde_json :: from_value ( p ) { Ok ( v ) => into_cherr ! ( ErrorKind :: InterfaceNotFound ( v ) ) , Err ( _ ) => into_cherr ! ( ErrorKind :: InterfaceNotFound ( None ) ) , } , _ => into_cherr ! ( ErrorKind :: InterfaceNotFound ( None ) ) , } } _ => into_cherr ! ( ErrorKind :: VarlinkReply_Error ( e ) ) , } } } # [ derive ( Serialize , Deserialize , Debug , PartialEq , Clone ) ] pub struct GetInfo_Reply { pub r#vendor : String , pub r#product : String , pub r#version : String , pub r#url : String , pub r#interfaces : Vec < String > , } impl varlink :: VarlinkReply for GetInfo_Reply { } # [ derive ( Serialize , Deserialize , Debug , PartialEq , Clone ) ] pub struct GetInfo_Args { } pub trait Call_GetInfo : VarlinkCallError { fn reply ( & mut self , r#vendor : String , r#product : String , r#version : String , r#url : String , r#interfaces : Vec < String > ) -> varlink :: Result < ( ) > { self . reply_struct ( GetInfo_Reply { r#vendor , r#product , r#version , r#url , r#interfaces } . into ( ) ) } } impl < 'a > Call_GetInfo for varlink :: Call < 'a > { } # [ derive ( Serialize , Deserialize , Debug , PartialEq , Clone ) ] pub struct Resolve_Reply { pub r#address : String , } impl varlink :: VarlinkReply for Resolve_Reply { } # [ derive ( Serialize , Deserialize , Debug , PartialEq , Clone ) ] pub struct Resolve_Args { pub r#interface : String , } pub trait Call_Resolve : VarlinkCallError { fn reply ( & mut self , r#address : String ) -> varlink :: Result < ( ) > { self . reply_struct ( Resolve_Reply { r#address } . into ( ) ) } } impl < 'a > Call_Resolve for varlink :: Call < 'a > { } pub trait VarlinkInterface { fn get_info ( & self , call : & mut Call_GetInfo , ) -> varlink :: Result < ( ) > ; fn resolve ( & self , call : & mut Call_Resolve , r#interface : String ) -> varlink :: Result < ( ) > ; fn call_upgraded ( & self , _call : & mut varlink :: Call , _bufreader : & mut BufRead ) -> varlink :: Result < Vec < u8 >> { Ok ( Vec :: new ( ) ) } } pub trait VarlinkClientInterface { fn get_info ( & mut self , ) -> varlink :: MethodCall < GetInfo_Args , GetInfo_Reply , Error > ; fn resolve ( & mut self , r#interface : String ) -> varlink :: MethodCall < Resolve_Args , Resolve_Reply , Error > ; } # [ allow ( dead_code ) ] pub struct VarlinkClient { connection : Arc < RwLock < varlink :: Connection >> , } impl VarlinkClient { # [ allow ( dead_code ) ] pub fn new ( connection : Arc < RwLock < varlink :: Connection >> ) -> Self { VarlinkClient { connection , } } } impl VarlinkClientInterface for VarlinkClient { fn get_info ( & mut self , ) -> varlink :: MethodCall < GetInfo_Args , GetInfo_Reply , Error > { varlink :: MethodCall :: < GetInfo_Args , GetInfo_Reply , Error > :: new ( self . connection . clone ( ) , "org.varlink.resolver.GetInfo" , GetInfo_Args { } ) } fn resolve ( & mut self , r#interface : String ) -> varlink :: MethodCall < Resolve_Args , Resolve_Reply , Error > { varlink :: MethodCall :: < Resolve_Args , Resolve_Reply , Error > :: new ( self . connection . clone ( ) , "org.varlink.resolver.Resolve" , Resolve_Args { r#interface } ) } } # [ allow ( dead_code ) ] pub struct VarlinkInterfaceProxy { inner : Box < VarlinkInterface + Send + Sync > , } # [ allow ( dead_code ) ] pub fn new ( inner : Box < VarlinkInterface + Send + Sync > ) -> VarlinkInterfaceProxy { VarlinkInterfaceProxy { inner } } impl varlink :: Interface for VarlinkInterfaceProxy { fn get_description ( & self ) -> & 'static str { "# Interface to resolve reverse-domain interface names to\n# service adresses\ninterface org.varlink.resolver\n\n# Get a list of all resolvable interfaces and information\n# about the resolver's identity.\nmethod GetInfo() -> (\n vendor: string,\n product: string,\n version: string,\n url: string,\n interfaces: []string\n)\n\n# Resolve an interface name to a registered varlink service address\nmethod Resolve(interface: string) -> (address: string)\n\nerror InterfaceNotFound (interface: string)\n" } fn get_name ( & self ) -> & 'static str { "org.varlink.resolver" } fn call_upgraded ( & self , call : & mut varlink :: Call , bufreader : & mut BufRead ) -> varlink :: Result < Vec < u8 >> { self . inner . call_upgraded ( call , bufreader ) } fn call ( & self , call : & mut varlink :: Call ) -> varlink :: Result < ( ) > { let req = call . request . unwrap ( ) ; match req . method . as_ref ( ) { "org.varlink.resolver.GetInfo" => self . inner . get_info ( call as & mut Call_GetInfo ) , "org.varlink.resolver.Resolve" => { if let Some ( args ) = req . parameters . clone ( ) { let args : Resolve_Args = match serde_json :: from_value ( args ) { Ok ( v ) => v , Err ( e ) => { let es = format ! ( "{}" , e ) ; let _ = call . reply_invalid_parameter ( es . clone ( ) ) ; return Err ( into_cherr ! ( varlink :: ErrorKind :: SerdeJsonDe ( es ) ) ) ; } } ; self . inner . resolve ( call as & mut Call_Resolve , args . r#interface ) } else { call . reply_invalid_parameter ( "parameters" . into ( ) ) } } , m => { call . reply_method_not_found ( String :: from ( m ) ) } } } } [INFO] [stderr] | ^^^^^^^^^^^^ help: use `dyn`: `dyn Call_Resolve` [INFO] [stderr] [INFO] [stderr] warning: trait objects without an explicit `dyn` are deprecated [INFO] [stderr] --> src/org_varlink_service.rs:239:35 [INFO] [stderr] | [INFO] [stderr] 239 | fn get_info(&self, call: &mut Call_GetInfo) -> varlink::Result<()>; [INFO] [stderr] | ^^^^^^^^^^^^ help: use `dyn`: `dyn Call_GetInfo` [INFO] [stderr] [INFO] [stderr] warning: trait objects without an explicit `dyn` are deprecated [INFO] [stderr] --> src/org_varlink_service.rs:242:20 [INFO] [stderr] | [INFO] [stderr] 242 | call: &mut Call_GetInterfaceDescription, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `dyn`: `dyn Call_GetInterfaceDescription` [INFO] [stderr] [INFO] [stderr] warning: trait objects without an explicit `dyn` are deprecated [INFO] [stderr] --> src/org_varlink_service.rs:248:26 [INFO] [stderr] | [INFO] [stderr] 248 | _bufreader: &mut BufRead, [INFO] [stderr] | ^^^^^^^ help: use `dyn`: `dyn BufRead` [INFO] [stderr] [INFO] [stderr] warning: trait objects without an explicit `dyn` are deprecated [INFO] [stderr] --> src/org_varlink_service.rs:293:16 [INFO] [stderr] | [INFO] [stderr] 293 | inner: Box, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `dyn`: `dyn VarlinkInterface + Send + Sync` [INFO] [stderr] [INFO] [stderr] warning: trait objects without an explicit `dyn` are deprecated [INFO] [stderr] --> src/org_varlink_service.rs:297:23 [INFO] [stderr] | [INFO] [stderr] 297 | pub fn new(inner: Box) -> VarlinkInterfaceProxy { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `dyn`: `dyn VarlinkInterface + Send + Sync` [INFO] [stderr] [INFO] [stderr] warning: trait objects without an explicit `dyn` are deprecated [INFO] [stderr] --> src/org_varlink_service.rs:311:25 [INFO] [stderr] | [INFO] [stderr] 311 | bufreader: &mut BufRead, [INFO] [stderr] | ^^^^^^^ help: use `dyn`: `dyn BufRead` [INFO] [stderr] [INFO] [stderr] warning: trait objects without an explicit `dyn` are deprecated [INFO] [stderr] --> src/org_varlink_service.rs:318:79 [INFO] [stderr] | [INFO] [stderr] 318 | "org.varlink.service.GetInfo" => self.inner.get_info(call as &mut Call_GetInfo), [INFO] [stderr] | ^^^^^^^^^^^^ help: use `dyn`: `dyn Call_GetInfo` [INFO] [stderr] [INFO] [stderr] warning: trait objects without an explicit `dyn` are deprecated [INFO] [stderr] --> src/org_varlink_service.rs:330:38 [INFO] [stderr] | [INFO] [stderr] 330 | call as &mut Call_GetInterfaceDescription, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `dyn`: `dyn Call_GetInterfaceDescription` [INFO] [stderr] [INFO] [stderr] Finished dev [unoptimized + debuginfo] target(s) in 12.24s [INFO] running `"docker" "inspect" "60a63a275d808138c6cd66a37661cfba33127ddcddf65a373654cedfa294b660"` [INFO] running `"docker" "rm" "-f" "60a63a275d808138c6cd66a37661cfba33127ddcddf65a373654cedfa294b660"` [INFO] [stdout] 60a63a275d808138c6cd66a37661cfba33127ddcddf65a373654cedfa294b660