pub struct FirewallApplyReport {
pub ok: bool,
pub refused: Option<String>,
pub applied: Vec<Applied>,
pub observation: FirewallObservation,
pub before: FirewallReport,
}Expand description
What apply did: the refusal when nothing ran, every command that ran with its
outcome, the firewall’s word afterwards, and the report the commands came from. ok
is the firewall’s verdict after the run, never the commands’ exit codes alone.
use majordomus_cli::mesh::firewall::{apply, report, FirewallApplyReport};
let a: FirewallApplyReport = apply(report(None, &[], None));
assert!(!a.ok && a.applied.is_empty());
assert!(a.refused.as_deref().unwrap().contains("nothing to apply"));Fields§
§ok: boolWhether every command ran and the firewall admits the plan afterwards.
refused: Option<String>The refusal, when nothing ran: not root, or no backend.
applied: Vec<Applied>The commands, in order, with their exit and output.
observation: FirewallObservationThe firewall’s word after the commands ran.
before: FirewallReportThe report the commands came from.
Trait Implementations§
Source§impl Clone for FirewallApplyReport
impl Clone for FirewallApplyReport
Source§fn clone(&self) -> FirewallApplyReport
fn clone(&self) -> FirewallApplyReport
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 FirewallApplyReport
impl Debug for FirewallApplyReport
Source§impl<'de> Deserialize<'de> for FirewallApplyReport
impl<'de> Deserialize<'de> for FirewallApplyReport
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
Source§impl JsonSchema for FirewallApplyReport
impl JsonSchema for FirewallApplyReport
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 moreAuto Trait Implementations§
impl Freeze for FirewallApplyReport
impl RefUnwindSafe for FirewallApplyReport
impl Send for FirewallApplyReport
impl Sync for FirewallApplyReport
impl Unpin for FirewallApplyReport
impl UnsafeUnpin for FirewallApplyReport
impl UnwindSafe for FirewallApplyReport
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