pub struct MoqEventPolicyTable { /* private fields */ }Expand description
Declared track-policy metadata: the closed, validated set of rows the resolver trusts. This is the reviewed seam onto the generated inventory.
Lookup is an exact typed match on (plane, canonical service domain).
Anything not declared — unknown service, other plane, empty table — is
unlabeled and denies. There is no ancestor walk, no floor, and no
bootstrap exception.
Implementations§
Source§impl MoqEventPolicyTable
impl MoqEventPolicyTable
Sourcepub fn build(
revision: u32,
rows: impl IntoIterator<Item = MoqEventPolicyRow>,
) -> Result<Self, TrackPolicyError>
pub fn build( revision: u32, rows: impl IntoIterator<Item = MoqEventPolicyRow>, ) -> Result<Self, TrackPolicyError>
Build the table from declared rows.
Fails (returning no table) on a revision newer than supported, a
noncanonical service domain, a service domain the declared plane’s
grammar can never represent (checked here, not only in
MoqEventPolicyRow::new, because the row fields are public and a
struct literal must not bypass the guard), or two rows declaring the
same plane + service with different labels. Older or equal revisions
are accepted: a newer server understanding an older table is
forward-compatible; the reverse is not, and denies.
Sourcepub fn empty() -> Self
pub fn empty() -> Self
The table that declares nothing. Every lookup is unlisted and denies; this is the honest pre-inventory state, not a bypass.
Sourcepub fn resolve(&self, object: &MoqEventObjectRef) -> Option<SecurityLabel>
pub fn resolve(&self, object: &MoqEventObjectRef) -> Option<SecurityLabel>
Exact typed lookup: the declared label for this object’s plane +
canonical service domain, or None when unlisted.
Trait Implementations§
Source§impl Clone for MoqEventPolicyTable
impl Clone for MoqEventPolicyTable
Source§fn clone(&self) -> MoqEventPolicyTable
fn clone(&self) -> MoqEventPolicyTable
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for MoqEventPolicyTable
impl Debug for MoqEventPolicyTable
Source§impl PartialEq for MoqEventPolicyTable
impl PartialEq for MoqEventPolicyTable
Source§fn eq(&self, other: &MoqEventPolicyTable) -> bool
fn eq(&self, other: &MoqEventPolicyTable) -> bool
self and other values to be equal, and is used by ==.impl Eq for MoqEventPolicyTable
impl StructuralPartialEq for MoqEventPolicyTable
Auto Trait Implementations§
impl Freeze for MoqEventPolicyTable
impl RefUnwindSafe for MoqEventPolicyTable
impl Send for MoqEventPolicyTable
impl Sync for MoqEventPolicyTable
impl Unpin for MoqEventPolicyTable
impl UnsafeUnpin for MoqEventPolicyTable
impl UnwindSafe for MoqEventPolicyTable
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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>
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>
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