@@ -2727,7 +2727,7 @@ impl<H> Easy2<H> {
2727
2727
// /// Fetches this handle's private pointer-sized piece of data.
2728
2728
// ///
2729
2729
// /// This corresponds to `CURLINFO_PRIVATE` and defaults to 0.
2730
- // pub fn private(&mut self) -> Result<usize, Error> {
2730
+ // pub fn private(&self) -> Result<usize, Error> {
2731
2731
// self.getopt_ptr(curl_sys::CURLINFO_PRIVATE).map(|p| p as usize)
2732
2732
// }
2733
2733
@@ -2767,7 +2767,7 @@ impl<H> Easy2<H> {
2767
2767
///
2768
2768
//// This corresponds to `CURLINFO_CONDITION_UNMET` and may return an error if the
2769
2769
/// option is not supported
2770
- pub fn time_condition_unmet ( & mut self ) -> Result < bool , Error > {
2770
+ pub fn time_condition_unmet ( & self ) -> Result < bool , Error > {
2771
2771
self . getopt_long ( curl_sys:: CURLINFO_CONDITION_UNMET )
2772
2772
. map ( |r| r != 0 )
2773
2773
}
@@ -2781,7 +2781,7 @@ impl<H> Easy2<H> {
2781
2781
///
2782
2782
/// Returns `Ok(None)` if no effective url is listed or `Err` if an error
2783
2783
/// happens or the underlying bytes aren't valid utf-8.
2784
- pub fn effective_url ( & mut self ) -> Result < Option < & str > , Error > {
2784
+ pub fn effective_url ( & self ) -> Result < Option < & str > , Error > {
2785
2785
self . getopt_str ( curl_sys:: CURLINFO_EFFECTIVE_URL )
2786
2786
}
2787
2787
@@ -2794,7 +2794,7 @@ impl<H> Easy2<H> {
2794
2794
///
2795
2795
/// Returns `Ok(None)` if no effective url is listed or `Err` if an error
2796
2796
/// happens or the underlying bytes aren't valid utf-8.
2797
- pub fn effective_url_bytes ( & mut self ) -> Result < Option < & [ u8 ] > , Error > {
2797
+ pub fn effective_url_bytes ( & self ) -> Result < Option < & [ u8 ] > , Error > {
2798
2798
self . getopt_bytes ( curl_sys:: CURLINFO_EFFECTIVE_URL )
2799
2799
}
2800
2800
@@ -2806,7 +2806,7 @@ impl<H> Easy2<H> {
2806
2806
///
2807
2807
/// Corresponds to `CURLINFO_RESPONSE_CODE` and returns an error if this
2808
2808
/// option is not supported.
2809
- pub fn response_code ( & mut self ) -> Result < u32 , Error > {
2809
+ pub fn response_code ( & self ) -> Result < u32 , Error > {
2810
2810
self . getopt_long ( curl_sys:: CURLINFO_RESPONSE_CODE )
2811
2811
. map ( |c| c as u32 )
2812
2812
}
@@ -2818,7 +2818,7 @@ impl<H> Easy2<H> {
2818
2818
///
2819
2819
/// Corresponds to `CURLINFO_HTTP_CONNECTCODE` and returns an error if this
2820
2820
/// option is not supported.
2821
- pub fn http_connectcode ( & mut self ) -> Result < u32 , Error > {
2821
+ pub fn http_connectcode ( & self ) -> Result < u32 , Error > {
2822
2822
self . getopt_long ( curl_sys:: CURLINFO_HTTP_CONNECTCODE )
2823
2823
. map ( |c| c as u32 )
2824
2824
}
@@ -2837,7 +2837,7 @@ impl<H> Easy2<H> {
2837
2837
///
2838
2838
/// This corresponds to `CURLINFO_FILETIME` and may return an error if the
2839
2839
/// option is not supported
2840
- pub fn filetime ( & mut self ) -> Result < Option < i64 > , Error > {
2840
+ pub fn filetime ( & self ) -> Result < Option < i64 > , Error > {
2841
2841
self . getopt_long ( curl_sys:: CURLINFO_FILETIME ) . map ( |r| {
2842
2842
if r == -1 {
2843
2843
None
@@ -2856,7 +2856,7 @@ impl<H> Easy2<H> {
2856
2856
///
2857
2857
/// This corresponds to `CURLINFO_SIZE_DOWNLOAD` and may return an error if the
2858
2858
/// option is not supported
2859
- pub fn download_size ( & mut self ) -> Result < f64 , Error > {
2859
+ pub fn download_size ( & self ) -> Result < f64 , Error > {
2860
2860
self . getopt_double ( curl_sys:: CURLINFO_SIZE_DOWNLOAD )
2861
2861
. map ( |r| r as f64 )
2862
2862
}
@@ -2867,7 +2867,7 @@ impl<H> Easy2<H> {
2867
2867
///
2868
2868
/// This corresponds to `CURLINFO_SIZE_UPLOAD` and may return an error if the
2869
2869
/// option is not supported
2870
- pub fn upload_size ( & mut self ) -> Result < f64 , Error > {
2870
+ pub fn upload_size ( & self ) -> Result < f64 , Error > {
2871
2871
self . getopt_double ( curl_sys:: CURLINFO_SIZE_UPLOAD )
2872
2872
. map ( |r| r as f64 )
2873
2873
}
@@ -2879,7 +2879,7 @@ impl<H> Easy2<H> {
2879
2879
///
2880
2880
/// This corresponds to `CURLINFO_CONTENT_LENGTH_DOWNLOAD` and may return an error if the
2881
2881
/// option is not supported
2882
- pub fn content_length_download ( & mut self ) -> Result < f64 , Error > {
2882
+ pub fn content_length_download ( & self ) -> Result < f64 , Error > {
2883
2883
self . getopt_double ( curl_sys:: CURLINFO_CONTENT_LENGTH_DOWNLOAD )
2884
2884
. map ( |r| r as f64 )
2885
2885
}
@@ -2891,7 +2891,7 @@ impl<H> Easy2<H> {
2891
2891
///
2892
2892
/// Corresponds to `CURLINFO_TOTAL_TIME` and may return an error if the
2893
2893
/// option isn't supported.
2894
- pub fn total_time ( & mut self ) -> Result < Duration , Error > {
2894
+ pub fn total_time ( & self ) -> Result < Duration , Error > {
2895
2895
self . getopt_double ( curl_sys:: CURLINFO_TOTAL_TIME )
2896
2896
. map ( double_seconds_to_duration)
2897
2897
}
@@ -2903,7 +2903,7 @@ impl<H> Easy2<H> {
2903
2903
///
2904
2904
/// Corresponds to `CURLINFO_NAMELOOKUP_TIME` and may return an error if the
2905
2905
/// option isn't supported.
2906
- pub fn namelookup_time ( & mut self ) -> Result < Duration , Error > {
2906
+ pub fn namelookup_time ( & self ) -> Result < Duration , Error > {
2907
2907
self . getopt_double ( curl_sys:: CURLINFO_NAMELOOKUP_TIME )
2908
2908
. map ( double_seconds_to_duration)
2909
2909
}
@@ -2915,7 +2915,7 @@ impl<H> Easy2<H> {
2915
2915
///
2916
2916
/// Corresponds to `CURLINFO_CONNECT_TIME` and may return an error if the
2917
2917
/// option isn't supported.
2918
- pub fn connect_time ( & mut self ) -> Result < Duration , Error > {
2918
+ pub fn connect_time ( & self ) -> Result < Duration , Error > {
2919
2919
self . getopt_double ( curl_sys:: CURLINFO_CONNECT_TIME )
2920
2920
. map ( double_seconds_to_duration)
2921
2921
}
@@ -2930,7 +2930,7 @@ impl<H> Easy2<H> {
2930
2930
///
2931
2931
/// Corresponds to `CURLINFO_APPCONNECT_TIME` and may return an error if the
2932
2932
/// option isn't supported.
2933
- pub fn appconnect_time ( & mut self ) -> Result < Duration , Error > {
2933
+ pub fn appconnect_time ( & self ) -> Result < Duration , Error > {
2934
2934
self . getopt_double ( curl_sys:: CURLINFO_APPCONNECT_TIME )
2935
2935
. map ( double_seconds_to_duration)
2936
2936
}
@@ -2945,7 +2945,7 @@ impl<H> Easy2<H> {
2945
2945
///
2946
2946
/// Corresponds to `CURLINFO_PRETRANSFER_TIME` and may return an error if the
2947
2947
/// option isn't supported.
2948
- pub fn pretransfer_time ( & mut self ) -> Result < Duration , Error > {
2948
+ pub fn pretransfer_time ( & self ) -> Result < Duration , Error > {
2949
2949
self . getopt_double ( curl_sys:: CURLINFO_PRETRANSFER_TIME )
2950
2950
. map ( double_seconds_to_duration)
2951
2951
}
@@ -2958,7 +2958,7 @@ impl<H> Easy2<H> {
2958
2958
///
2959
2959
/// Corresponds to `CURLINFO_STARTTRANSFER_TIME` and may return an error if the
2960
2960
/// option isn't supported.
2961
- pub fn starttransfer_time ( & mut self ) -> Result < Duration , Error > {
2961
+ pub fn starttransfer_time ( & self ) -> Result < Duration , Error > {
2962
2962
self . getopt_double ( curl_sys:: CURLINFO_STARTTRANSFER_TIME )
2963
2963
. map ( double_seconds_to_duration)
2964
2964
}
@@ -2972,7 +2972,7 @@ impl<H> Easy2<H> {
2972
2972
///
2973
2973
/// Corresponds to `CURLINFO_REDIRECT_TIME` and may return an error if the
2974
2974
/// option isn't supported.
2975
- pub fn redirect_time ( & mut self ) -> Result < Duration , Error > {
2975
+ pub fn redirect_time ( & self ) -> Result < Duration , Error > {
2976
2976
self . getopt_double ( curl_sys:: CURLINFO_REDIRECT_TIME )
2977
2977
. map ( double_seconds_to_duration)
2978
2978
}
@@ -2981,7 +2981,7 @@ impl<H> Easy2<H> {
2981
2981
///
2982
2982
/// Corresponds to `CURLINFO_REDIRECT_COUNT` and may return an error if the
2983
2983
/// option isn't supported.
2984
- pub fn redirect_count ( & mut self ) -> Result < u32 , Error > {
2984
+ pub fn redirect_count ( & self ) -> Result < u32 , Error > {
2985
2985
self . getopt_long ( curl_sys:: CURLINFO_REDIRECT_COUNT )
2986
2986
. map ( |c| c as u32 )
2987
2987
}
@@ -2996,7 +2996,7 @@ impl<H> Easy2<H> {
2996
2996
///
2997
2997
/// Corresponds to `CURLINFO_REDIRECT_URL` and may return an error if the
2998
2998
/// url isn't valid utf-8 or an error happens.
2999
- pub fn redirect_url ( & mut self ) -> Result < Option < & str > , Error > {
2999
+ pub fn redirect_url ( & self ) -> Result < Option < & str > , Error > {
3000
3000
self . getopt_str ( curl_sys:: CURLINFO_REDIRECT_URL )
3001
3001
}
3002
3002
@@ -3009,15 +3009,15 @@ impl<H> Easy2<H> {
3009
3009
/// URL.
3010
3010
///
3011
3011
/// Corresponds to `CURLINFO_REDIRECT_URL` and may return an error.
3012
- pub fn redirect_url_bytes ( & mut self ) -> Result < Option < & [ u8 ] > , Error > {
3012
+ pub fn redirect_url_bytes ( & self ) -> Result < Option < & [ u8 ] > , Error > {
3013
3013
self . getopt_bytes ( curl_sys:: CURLINFO_REDIRECT_URL )
3014
3014
}
3015
3015
3016
3016
/// Get size of retrieved headers
3017
3017
///
3018
3018
/// Corresponds to `CURLINFO_HEADER_SIZE` and may return an error if the
3019
3019
/// option isn't supported.
3020
- pub fn header_size ( & mut self ) -> Result < u64 , Error > {
3020
+ pub fn header_size ( & self ) -> Result < u64 , Error > {
3021
3021
self . getopt_long ( curl_sys:: CURLINFO_HEADER_SIZE )
3022
3022
. map ( |c| c as u64 )
3023
3023
}
@@ -3026,7 +3026,7 @@ impl<H> Easy2<H> {
3026
3026
///
3027
3027
/// Corresponds to `CURLINFO_REQUEST_SIZE` and may return an error if the
3028
3028
/// option isn't supported.
3029
- pub fn request_size ( & mut self ) -> Result < u64 , Error > {
3029
+ pub fn request_size ( & self ) -> Result < u64 , Error > {
3030
3030
self . getopt_long ( curl_sys:: CURLINFO_REQUEST_SIZE )
3031
3031
. map ( |c| c as u64 )
3032
3032
}
@@ -3040,7 +3040,7 @@ impl<H> Easy2<H> {
3040
3040
///
3041
3041
/// Corresponds to `CURLINFO_CONTENT_TYPE` and may return an error if the
3042
3042
/// option isn't supported.
3043
- pub fn content_type ( & mut self ) -> Result < Option < & str > , Error > {
3043
+ pub fn content_type ( & self ) -> Result < Option < & str > , Error > {
3044
3044
self . getopt_str ( curl_sys:: CURLINFO_CONTENT_TYPE )
3045
3045
}
3046
3046
@@ -3053,7 +3053,7 @@ impl<H> Easy2<H> {
3053
3053
///
3054
3054
/// Corresponds to `CURLINFO_CONTENT_TYPE` and may return an error if the
3055
3055
/// option isn't supported.
3056
- pub fn content_type_bytes ( & mut self ) -> Result < Option < & [ u8 ] > , Error > {
3056
+ pub fn content_type_bytes ( & self ) -> Result < Option < & [ u8 ] > , Error > {
3057
3057
self . getopt_bytes ( curl_sys:: CURLINFO_CONTENT_TYPE )
3058
3058
}
3059
3059
@@ -3064,7 +3064,7 @@ impl<H> Easy2<H> {
3064
3064
///
3065
3065
/// Corresponds to `CURLINFO_OS_ERRNO` and may return an error if the
3066
3066
/// option isn't supported.
3067
- pub fn os_errno ( & mut self ) -> Result < i32 , Error > {
3067
+ pub fn os_errno ( & self ) -> Result < i32 , Error > {
3068
3068
self . getopt_long ( curl_sys:: CURLINFO_OS_ERRNO )
3069
3069
. map ( |c| c as i32 )
3070
3070
}
@@ -3077,15 +3077,15 @@ impl<H> Easy2<H> {
3077
3077
///
3078
3078
/// Corresponds to `CURLINFO_PRIMARY_IP` and may return an error if the
3079
3079
/// option isn't supported.
3080
- pub fn primary_ip ( & mut self ) -> Result < Option < & str > , Error > {
3080
+ pub fn primary_ip ( & self ) -> Result < Option < & str > , Error > {
3081
3081
self . getopt_str ( curl_sys:: CURLINFO_PRIMARY_IP )
3082
3082
}
3083
3083
3084
3084
/// Get the latest destination port number
3085
3085
///
3086
3086
/// Corresponds to `CURLINFO_PRIMARY_PORT` and may return an error if the
3087
3087
/// option isn't supported.
3088
- pub fn primary_port ( & mut self ) -> Result < u16 , Error > {
3088
+ pub fn primary_port ( & self ) -> Result < u16 , Error > {
3089
3089
self . getopt_long ( curl_sys:: CURLINFO_PRIMARY_PORT )
3090
3090
. map ( |c| c as u16 )
3091
3091
}
@@ -3098,15 +3098,15 @@ impl<H> Easy2<H> {
3098
3098
///
3099
3099
/// Corresponds to `CURLINFO_LOCAL_IP` and may return an error if the
3100
3100
/// option isn't supported.
3101
- pub fn local_ip ( & mut self ) -> Result < Option < & str > , Error > {
3101
+ pub fn local_ip ( & self ) -> Result < Option < & str > , Error > {
3102
3102
self . getopt_str ( curl_sys:: CURLINFO_LOCAL_IP )
3103
3103
}
3104
3104
3105
3105
/// Get the latest local port number
3106
3106
///
3107
3107
/// Corresponds to `CURLINFO_LOCAL_PORT` and may return an error if the
3108
3108
/// option isn't supported.
3109
- pub fn local_port ( & mut self ) -> Result < u16 , Error > {
3109
+ pub fn local_port ( & self ) -> Result < u16 , Error > {
3110
3110
self . getopt_long ( curl_sys:: CURLINFO_LOCAL_PORT )
3111
3111
. map ( |c| c as u16 )
3112
3112
}
@@ -3426,7 +3426,7 @@ impl<H> Easy2<H> {
3426
3426
unsafe { self . cvt ( curl_sys:: curl_easy_setopt ( self . inner . handle , opt, blob_ptr) ) }
3427
3427
}
3428
3428
3429
- fn getopt_bytes ( & mut self , opt : curl_sys:: CURLINFO ) -> Result < Option < & [ u8 ] > , Error > {
3429
+ fn getopt_bytes ( & self , opt : curl_sys:: CURLINFO ) -> Result < Option < & [ u8 ] > , Error > {
3430
3430
unsafe {
3431
3431
let p = self . getopt_ptr ( opt) ?;
3432
3432
if p. is_null ( ) {
@@ -3437,7 +3437,7 @@ impl<H> Easy2<H> {
3437
3437
}
3438
3438
}
3439
3439
3440
- fn getopt_ptr ( & mut self , opt : curl_sys:: CURLINFO ) -> Result < * const c_char , Error > {
3440
+ fn getopt_ptr ( & self , opt : curl_sys:: CURLINFO ) -> Result < * const c_char , Error > {
3441
3441
unsafe {
3442
3442
let mut p = ptr:: null ( ) ;
3443
3443
let rc = curl_sys:: curl_easy_getinfo ( self . inner . handle , opt, & mut p) ;
@@ -3446,7 +3446,7 @@ impl<H> Easy2<H> {
3446
3446
}
3447
3447
}
3448
3448
3449
- fn getopt_str ( & mut self , opt : curl_sys:: CURLINFO ) -> Result < Option < & str > , Error > {
3449
+ fn getopt_str ( & self , opt : curl_sys:: CURLINFO ) -> Result < Option < & str > , Error > {
3450
3450
match self . getopt_bytes ( opt) {
3451
3451
Ok ( None ) => Ok ( None ) ,
3452
3452
Err ( e) => Err ( e) ,
@@ -3457,7 +3457,7 @@ impl<H> Easy2<H> {
3457
3457
}
3458
3458
}
3459
3459
3460
- fn getopt_long ( & mut self , opt : curl_sys:: CURLINFO ) -> Result < c_long , Error > {
3460
+ fn getopt_long ( & self , opt : curl_sys:: CURLINFO ) -> Result < c_long , Error > {
3461
3461
unsafe {
3462
3462
let mut p = 0 ;
3463
3463
let rc = curl_sys:: curl_easy_getinfo ( self . inner . handle , opt, & mut p) ;
@@ -3466,7 +3466,7 @@ impl<H> Easy2<H> {
3466
3466
}
3467
3467
}
3468
3468
3469
- fn getopt_double ( & mut self , opt : curl_sys:: CURLINFO ) -> Result < c_double , Error > {
3469
+ fn getopt_double ( & self , opt : curl_sys:: CURLINFO ) -> Result < c_double , Error > {
3470
3470
unsafe {
3471
3471
let mut p = 0 as c_double ;
3472
3472
let rc = curl_sys:: curl_easy_getinfo ( self . inner . handle , opt, & mut p) ;
0 commit comments