pub struct Applied {
pub line: String,
pub ok: bool,
pub output: String,
}Expand description
One command apply ran: the line, whether it exited 0 without printing an error,
and everything it printed, so a refusal by the tool is read in the report and not in
a log.
use majordomus_cli::mesh::firewall::Applied;
let a: Applied = serde_json::from_value(serde_json::json!({
"line": "ufw allow in proto udp to 239.255.77.77 port 7741", "ok": true, "output": "Rule added",
})).unwrap();
assert!(a.ok && a.output == "Rule added");Fields§
§line: StringThe line that ran.
ok: boolWhether it exited 0.
output: StringWhat it printed.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Applied
impl<'de> Deserialize<'de> for Applied
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 Applied
impl JsonSchema for Applied
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 Applied
impl RefUnwindSafe for Applied
impl Send for Applied
impl Sync for Applied
impl Unpin for Applied
impl UnsafeUnpin for Applied
impl UnwindSafe for Applied
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