File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -6,10 +6,12 @@ use crate::response::*;
66use crate :: selector:: Selector ;
77use crate :: util:: { validate_duration, RuleType , TargetState } ;
88use std:: collections:: HashMap ;
9+ use std:: fmt;
910use url:: Url ;
1011
1112/// A helper enum that is passed to the [Client::new] function in
1213/// order to avoid errors on unsupported connection schemes.
14+ #[ derive( Debug ) ]
1315pub enum Scheme {
1416 Http ,
1517 Https ,
@@ -24,6 +26,15 @@ impl Scheme {
2426 }
2527}
2628
29+ impl fmt:: Display for Scheme {
30+ fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
31+ match self {
32+ Self :: Http => write ! ( f, "http" ) ,
33+ Self :: Https => write ! ( f, "https" ) ,
34+ }
35+ }
36+ }
37+
2738/// A client used to execute queries. It uses a [reqwest::Client] internally
2839/// that manages connections for us.
2940#[ derive( Clone ) ]
You can’t perform that action at this time.
0 commit comments