pub struct GovernancePolicyEngine { /* private fields */ }Expand description
Governance-XML-driven PolicyEngine default implementation.
Clone is deliberately NOT derived: the Governance struct
itself is Clone, but the engine is typically held as an
Arc<dyn PolicyEngine> in several runtime components —
then an Arc::clone is the right way, not a deep copy.
Implementations§
Source§impl GovernancePolicyEngine
impl GovernancePolicyEngine
Sourcepub fn new(
domain_id: u32,
governance: Governance,
default_suite: SuiteHint,
) -> Self
pub fn new( domain_id: u32, governance: Governance, default_suite: SuiteHint, ) -> Self
Constructor with an explicit default suite. For v1.4 parity
use Self::with_defaults.
Sourcepub fn with_defaults(domain_id: u32, governance: Governance) -> Self
pub fn with_defaults(domain_id: u32, governance: Governance) -> Self
Constructor with the v1.4 default suite (AES_128_GCM).
Sourcepub fn message_protection_kind(&self) -> ProtectionKind
pub fn message_protection_kind(&self) -> ProtectionKind
Current ProtectionKind from governance for the participant
domain — same lookup as crate::SharedSecurityGate::message_protection.
Trait Implementations§
Source§impl Debug for GovernancePolicyEngine
impl Debug for GovernancePolicyEngine
Source§impl PolicyEngine for GovernancePolicyEngine
impl PolicyEngine for GovernancePolicyEngine
Source§fn outbound_decision(&self, ctx: OutboundCtx<'_>) -> PolicyDecision
fn outbound_decision(&self, ctx: OutboundCtx<'_>) -> PolicyDecision
Outbound path: which protection level should the wire packet have?
Source§fn inbound_decision(&self, ctx: InboundCtx<'_>) -> PolicyDecision
fn inbound_decision(&self, ctx: InboundCtx<'_>) -> PolicyDecision
Inbound path: accept / drop / decrypt the packet?
Source§fn accept_peer(&self, _caps: &PeerCapabilities) -> bool
fn accept_peer(&self, _caps: &PeerCapabilities) -> bool
SEDP admission: is this peer (according to its capabilities)
fundamentally acceptable for a match?
Auto Trait Implementations§
impl Freeze for GovernancePolicyEngine
impl RefUnwindSafe for GovernancePolicyEngine
impl Send for GovernancePolicyEngine
impl Sync for GovernancePolicyEngine
impl Unpin for GovernancePolicyEngine
impl UnsafeUnpin for GovernancePolicyEngine
impl UnwindSafe for GovernancePolicyEngine
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