Skip to content

Commit 0d5dbea

Browse files
guanqunalexcrichton
authored andcommitted
add Clone/Copy for more enums (#291)
1 parent e29d113 commit 0d5dbea

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/easy/handler.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,7 @@ pub enum ProxyType {
409409

410410
/// Possible conditions for the `time_condition` method.
411411
#[allow(missing_docs)]
412-
#[derive(Debug)]
412+
#[derive(Debug, Clone, Copy)]
413413
pub enum TimeCondition {
414414
None = curl_sys::CURL_TIMECOND_NONE as isize,
415415
IfModifiedSince = curl_sys::CURL_TIMECOND_IFMODSINCE as isize,
@@ -424,7 +424,7 @@ pub enum TimeCondition {
424424

425425
/// Possible values to pass to the `ip_resolve` method.
426426
#[allow(missing_docs)]
427-
#[derive(Debug)]
427+
#[derive(Debug, Clone, Copy)]
428428
pub enum IpResolve {
429429
V4 = curl_sys::CURL_IPRESOLVE_V4 as isize,
430430
V6 = curl_sys::CURL_IPRESOLVE_V6 as isize,
@@ -437,7 +437,7 @@ pub enum IpResolve {
437437
}
438438

439439
/// Possible values to pass to the `http_version` method.
440-
#[derive(Debug)]
440+
#[derive(Debug, Clone, Copy)]
441441
pub enum HttpVersion {
442442
/// We don't care what http version to use, and we'd like the library to
443443
/// choose the best possible for us.
@@ -487,7 +487,7 @@ pub enum SslVersion {
487487
}
488488

489489
/// Possible return values from the `seek_function` callback.
490-
#[derive(Debug)]
490+
#[derive(Debug, Clone, Copy)]
491491
pub enum SeekResult {
492492
/// Indicates that the seek operation was a success
493493
Ok = curl_sys::CURL_SEEKFUNC_OK as isize,
@@ -508,7 +508,7 @@ pub enum SeekResult {
508508

509509
/// Possible data chunks that can be witnessed as part of the `debug_function`
510510
/// callback.
511-
#[derive(Debug)]
511+
#[derive(Debug, Clone, Copy)]
512512
pub enum InfoType {
513513
/// The data is informational text.
514514
Text,
@@ -565,7 +565,7 @@ pub enum WriteError {
565565
}
566566

567567
/// Options for `.netrc` parsing.
568-
#[derive(Debug)]
568+
#[derive(Debug, Clone, Copy)]
569569
pub enum NetRc {
570570
/// Ignoring `.netrc` file and use information from url
571571
///

0 commit comments

Comments
 (0)