aboutsummaryrefslogtreecommitdiff
path: root/src/rule.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/rule.rs')
-rw-r--r--src/rule.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/rule.rs b/src/rule.rs
index bd68c73..7b8d5cc 100644
--- a/src/rule.rs
+++ b/src/rule.rs
@@ -10,8 +10,8 @@ use netlink_packet_route::rule::RuleFlag;
use rtnetlink::RuleAddRequest;
/// A rule entry.
-#[derive(Debug)]
-pub struct Rule<T> {
+#[derive(Clone, Debug)]
+pub struct Rule<T: Clone> {
/// Whether to invert the matching criteria.
pub invert: bool,
/// Firewall mark to match against.
@@ -122,7 +122,7 @@ impl Rule<Ipv6Addr> {
}
}
-impl<T> Rule<T> {
+impl<T: Clone> Rule<T> {
fn prepare_add(&self, c: &Connection) -> RuleAddRequest {
let mut add = c.handle().rule().add().action(self.action);