Skip to content

Commit

Permalink
Add missing derives to container opts
Browse files Browse the repository at this point in the history
Signed-off-by: xtex <[email protected]>
  • Loading branch information
xtexChooser committed Sep 10, 2023
1 parent f35e6f9 commit 41faadc
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/opts/containers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ use containers_api::{
impl_str_field, impl_url_bool_field, impl_url_field, impl_url_str_field, impl_url_vec_field,
impl_vec_field,
};
use serde::{Deserialize, Serialize};
use std::fmt;

impl_opts_builder!(url =>
Expand Down Expand Up @@ -318,7 +319,7 @@ impl fmt::Display for ImageVolumeMode {
}
}

#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
/// How to handle the `NOTIFY_SOCKET`. Used with
/// [`sdnotify_mode`](ContainerCreateOptsBuilder::sdnotify_mode).
pub enum SocketNotifyMode {
Expand Down Expand Up @@ -346,7 +347,7 @@ impl fmt::Display for SocketNotifyMode {
}
}

#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
/// Used with [`ContainerCreateOptsBuilder::seccomp_policy`](ContainerCreateOptsBuilder::seccomp_policy).
#[derive(Default)]
pub enum SeccompPolicy {
Expand All @@ -372,7 +373,7 @@ impl fmt::Display for SeccompPolicy {
}
}

#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
/// Used with [`ContainerCreateOptsBuilder::systemd`](ContainerCreateOptsBuilder::systemd).
#[derive(Default)]
pub enum SystemdEnabled {
Expand All @@ -398,7 +399,7 @@ impl fmt::Display for SystemdEnabled {
}
}

#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
/// Used with
/// [`ContainerCreateOptsBuilder::restart_policy`](ContainerCreateOptsBuilder::restart_policy).
#[derive(Default)]
Expand Down

0 comments on commit 41faadc

Please sign in to comment.