pub enum Backend {
Ufw,
Nftables,
ApplicationFirewall,
None,
}Expand description
The firewall front this host runs, as far as the executable can tell without privilege:
decided by detect from the platform and the path, and the thing render,
observe and apply are specific to.
use majordomus_cli::mesh::firewall::Backend;
assert_eq!(serde_json::to_value(Backend::ApplicationFirewall).unwrap(), "application_firewall");
assert_eq!(Backend::None.as_str(), "none");Variants§
Ufw
Uncomplicated Firewall, the Debian and Ubuntu front: ufw is on the path.
Nftables
nftables without ufw in front: nft is on the path.
ApplicationFirewall
macOS: the application firewall (socketfilterfw), which admits executables, not ports.
None
No firewall front this executable knows; nothing is observed and nothing is applied.
Implementations§
Source§impl Backend
impl Backend
Sourcepub fn as_str(self) -> &'static str
pub fn as_str(self) -> &'static str
The word a person reads in a report or a doctor line, which is the tool’s own name where there is one and a description where the tool is a system service.
use majordomus_cli::mesh::firewall::Backend;
assert_eq!(Backend::Ufw.as_str(), "ufw");
assert_eq!(Backend::Nftables.as_str(), "nftables");
assert_eq!(Backend::ApplicationFirewall.as_str(), "macOS application firewall");Trait Implementations§
impl Copy for Backend
Source§impl<'de> Deserialize<'de> for Backend
impl<'de> Deserialize<'de> for Backend
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 Backend
Source§impl JsonSchema for Backend
impl JsonSchema for Backend
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 moreimpl StructuralPartialEq for Backend
Auto Trait Implementations§
impl Freeze for Backend
impl RefUnwindSafe for Backend
impl Send for Backend
impl Sync for Backend
impl Unpin for Backend
impl UnsafeUnpin for Backend
impl UnwindSafe for Backend
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.