@@ -151,6 +151,31 @@ impl Version {
151151 self . flag ( curl_sys:: CURL_VERSION_BROTLI )
152152 }
153153
154+ /// Returns whether libcurl was built with support for Alt-Svc.
155+ pub fn feature_altsvc ( & self ) -> bool {
156+ self . flag ( curl_sys:: CURL_VERSION_ALTSVC )
157+ }
158+
159+ /// Returns whether libcurl was built with support for zstd
160+ pub fn feature_zstd ( & self ) -> bool {
161+ self . flag ( curl_sys:: CURL_VERSION_ZSTD )
162+ }
163+
164+ /// Returns whether libcurl was built with support for unicode
165+ pub fn feature_unicode ( & self ) -> bool {
166+ self . flag ( curl_sys:: CURL_VERSION_UNICODE )
167+ }
168+
169+ /// Returns whether libcurl was built with support for hsts
170+ pub fn feature_hsts ( & self ) -> bool {
171+ self . flag ( curl_sys:: CURL_VERSION_HSTS )
172+ }
173+
174+ /// Returns whether libcurl was built with support for gsasl
175+ pub fn feature_gsasl ( & self ) -> bool {
176+ self . flag ( curl_sys:: CURL_VERSION_GSASL )
177+ }
178+
154179 fn flag ( & self , flag : c_int ) -> bool {
155180 unsafe { ( * self . inner ) . features & flag != 0 }
156181 }
@@ -345,6 +370,17 @@ impl Version {
345370 }
346371 }
347372 }
373+
374+ /// If available, the human readable version of hyper
375+ pub fn gsasl_version ( & self ) -> Option < & str > {
376+ unsafe {
377+ if ( * self . inner ) . age >= curl_sys:: CURLVERSION_TENTH {
378+ crate :: opt_str ( ( * self . inner ) . gsasl_version )
379+ } else {
380+ None
381+ }
382+ }
383+ }
348384}
349385
350386impl fmt:: Debug for Version {
@@ -371,7 +407,14 @@ impl fmt::Debug for Version {
371407 . field (
372408 "feature_unix_domain_socket" ,
373409 & self . feature_unix_domain_socket ( ) ,
374- ) ;
410+ )
411+ . field ( "feature_altsvc" , & self . feature_altsvc ( ) )
412+ . field ( "feature_zstd" , & self . feature_zstd ( ) )
413+ . field ( "feature_unicode" , & self . feature_unicode ( ) )
414+ . field ( "feature_http3" , & self . feature_http3 ( ) )
415+ . field ( "feature_http2" , & self . feature_http2 ( ) )
416+ . field ( "feature_gsasl" , & self . feature_gsasl ( ) )
417+ . field ( "feature_brotli" , & self . feature_brotli ( ) ) ;
375418
376419 if let Some ( s) = self . ssl_version ( ) {
377420 f. field ( "ssl_version" , & s) ;
@@ -421,6 +464,9 @@ impl fmt::Debug for Version {
421464 if let Some ( s) = self . hyper_version ( ) {
422465 f. field ( "hyper_version" , & s) ;
423466 }
467+ if let Some ( s) = self . gsasl_version ( ) {
468+ f. field ( "gsasl_version" , & s) ;
469+ }
424470
425471 f. field ( "protocols" , & self . protocols ( ) . collect :: < Vec < _ > > ( ) ) ;
426472
0 commit comments