pub struct FirewallPlan {
pub local_addresses: Vec<String>,
pub networks: Vec<String>,
pub hub_ports: Vec<u16>,
pub rules: Vec<FirewallRule>,
}Expand description
What the declaration implies this host must admit: the rules, the networks they admit
from, the hub ports this machine is listed for, and the addresses the plan saw. The
answer of plan; an empty rules is “nothing is needed”, which is the answer for no
declaration and for a disabled one.
use majordomus_cli::mesh::firewall::{plan, FirewallPlan};
let nothing: FirewallPlan = plan(None, &[], None);
assert!(nothing.rules.is_empty() && nothing.hub_ports.is_empty() && nothing.networks.is_empty());Fields§
§local_addresses: Vec<String>This machine’s addresses, as the plan saw them.
networks: Vec<String>The private networks peers come from: the enclosing ranges of every address the declaration names, or of this machine’s own when it names none.
hub_ports: Vec<u16>The ports of the declared hubs this machine is.
rules: Vec<FirewallRule>The admissions, in a fixed order.
Trait Implementations§
Source§impl Clone for FirewallPlan
impl Clone for FirewallPlan
Source§fn clone(&self) -> FirewallPlan
fn clone(&self) -> FirewallPlan
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for FirewallPlan
impl Debug for FirewallPlan
Source§impl<'de> Deserialize<'de> for FirewallPlan
impl<'de> Deserialize<'de> for FirewallPlan
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for FirewallPlan
Source§impl JsonSchema for FirewallPlan
impl JsonSchema for FirewallPlan
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§impl PartialEq for FirewallPlan
impl PartialEq for FirewallPlan
Source§fn eq(&self, other: &FirewallPlan) -> bool
fn eq(&self, other: &FirewallPlan) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for FirewallPlan
impl Serialize for FirewallPlan
impl StructuralPartialEq for FirewallPlan
Auto Trait Implementations§
impl Freeze for FirewallPlan
impl RefUnwindSafe for FirewallPlan
impl Send for FirewallPlan
impl Sync for FirewallPlan
impl Unpin for FirewallPlan
impl UnsafeUnpin for FirewallPlan
impl UnwindSafe for FirewallPlan
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.