pub struct CompiledId(pub u64);Expand description
A compiled predicate, as an evaluator itself names it.
Minted by crate::outcome::Evaluator::compile and opaque to this
crate beyond equality: not an index, not something this crate can
allocate or interpret, because the compiled artifact it names belongs to
the evaluator, not the caller. That ownership split is deliberate –
see compile’s doc comment – because an evaluator may run out of
process, possibly in another language, where a caller-owned handle
could only ever be an identifier for state the caller does not hold.
PolicyId is this crate’s own bookkeeping, assigned by
PolicyTreeBuilder at registration
time; CompiledId is the evaluator’s, assigned at compile time, and
the two are not interchangeable – a multi-policy evaluator learns which
artifact to use for a subject from CompiledId, never from PolicyId,
which it never sees.
Tuple Fields§
§0: u64Trait Implementations§
Source§impl Clone for CompiledId
impl Clone for CompiledId
Source§fn clone(&self) -> CompiledId
fn clone(&self) -> CompiledId
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 CompiledId
impl Debug for CompiledId
Source§impl Hash for CompiledId
impl Hash for CompiledId
Source§impl PartialEq for CompiledId
impl PartialEq for CompiledId
Source§fn eq(&self, other: &CompiledId) -> bool
fn eq(&self, other: &CompiledId) -> bool
self and other values to be equal, and is used by ==.impl Copy for CompiledId
impl Eq for CompiledId
impl StructuralPartialEq for CompiledId
Auto Trait Implementations§
impl Freeze for CompiledId
impl RefUnwindSafe for CompiledId
impl Send for CompiledId
impl Sync for CompiledId
impl Unpin for CompiledId
impl UnsafeUnpin for CompiledId
impl UnwindSafe for CompiledId
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
§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.