pub struct PolicyTest {
pub src: Option<String>,
pub src_posture_attrs: Option<BTreeMap<String, Value>>,
pub proto: Option<String>,
pub accept: Option<Vec<String>>,
pub deny: Option<Vec<String>>,
pub unknown: Unknown,
}Expand description
One test case, as acl/validate takes them.
Modelled although it is only ever sent, because a caller writes these by hand and a name the description does not have is a test that silently does not run.
Fields§
§src: Option<String>The identity the test runs as: an email address, a group, a tag or a host.
src_posture_attrs: Option<BTreeMap<String, Value>>Posture attributes to evaluate posture conditions against, as
{"node:os": "windows"}. Only needed by a policy that has them.
proto: Option<String>tcp, udp and the rest. Omitted tests either.
accept: Option<Vec<String>>host:port destinations this identity must reach.
deny: Option<Vec<String>>host:port destinations it must not.
unknown: UnknownEverything the description did not mention, kept so that a control plane ahead of this build still answers usefully.
Implementations§
Trait Implementations§
Source§impl Clone for PolicyTest
impl Clone for PolicyTest
Source§fn clone(&self) -> PolicyTest
fn clone(&self) -> PolicyTest
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 PolicyTest
impl Debug for PolicyTest
Source§impl<'de> Deserialize<'de> for PolicyTest
impl<'de> Deserialize<'de> for PolicyTest
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 PartialEq for PolicyTest
impl PartialEq for PolicyTest
Source§impl Serialize for PolicyTest
impl Serialize for PolicyTest
impl StructuralPartialEq for PolicyTest
Auto Trait Implementations§
impl Freeze for PolicyTest
impl RefUnwindSafe for PolicyTest
impl Send for PolicyTest
impl Sync for PolicyTest
impl Unpin for PolicyTest
impl UnsafeUnpin for PolicyTest
impl UnwindSafe for PolicyTest
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