pub struct CompiledNetworkPolicy { /* private fields */ }Expand description
A compiled, matchable network policy.
Implementations§
Source§impl CompiledNetworkPolicy
impl CompiledNetworkPolicy
Sourcepub const fn mode(&self) -> NetworkPolicyMode
pub const fn mode(&self) -> NetworkPolicyMode
The mode this policy was compiled from.
Sourcepub fn allows_domain(&self, domain: &str) -> bool
pub fn allows_domain(&self, domain: &str) -> bool
Whether the policy permits connecting to domain.
Source§impl CompiledNetworkPolicy
impl CompiledNetworkPolicy
Sourcepub fn verdict(&self, domain: &str) -> NetworkVerdict
pub fn verdict(&self, domain: &str) -> NetworkVerdict
What the lists decide about domain: the verdict of
allows_domain, except that an allow-list that
does not name the host leaves it open for the
approver instead of denying it.
Trait Implementations§
Source§impl Clone for CompiledNetworkPolicy
impl Clone for CompiledNetworkPolicy
Auto Trait Implementations§
impl Forget for CompiledNetworkPolicy
impl Freeze for CompiledNetworkPolicy
impl Move for CompiledNetworkPolicy
impl RefUnwindSafe for CompiledNetworkPolicy
impl Send for CompiledNetworkPolicy
impl Sync for CompiledNetworkPolicy
impl Unpin for CompiledNetworkPolicy
impl UnsafeUnpin for CompiledNetworkPolicy
impl UnwindSafe for CompiledNetworkPolicy
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,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more