pub struct ParsedPolicy {
pub applicability: Applicability,
pub observes: Applicability,
pub staleness: Staleness,
pub language: String,
pub predicate: Value,
pub lookups: Vec<Lookup>,
pub revision: Revision,
}Expand description
One policy statement, ready to compile.
Fields§
§applicability: ApplicabilityWhat this policy may be asked to decide.
observes: ApplicabilityWhat this policy is told about.
staleness: StalenessHow stale this policy’s evaluator’s view may be.
language: StringWhich evaluator language this policy names – "regex" for
didbot-policy-regex, and open to whatever else a build carries.
Opaque to this crate; see crate::compile.
predicate: ValueThe predicate document, typed by language and opaque here.
lookups: Vec<Lookup>The records in other repositories this policy’s record declared it
reads – see crate::records::Lookup. Every statement of one
record carries the whole record’s list, because the write path
reads them before it knows which statement will ask for one.
revision: RevisionWhich revision of this declaration this is – a label whoever
declares it chooses. crate::set::declarations stamps every
declaration Revision(0), so an operator’s records all carry the
same one; nothing here orders by it, and
crate::last_good::LastGoodPolicies keys on the declaration’s id.
It reaches an operator through crate::merge::LastGoodFallback.
See didbot_policy::Revision’s own doc comment for why a revision
carries no timestamp.
Trait Implementations§
Source§impl Clone for ParsedPolicy
impl Clone for ParsedPolicy
Source§fn clone(&self) -> ParsedPolicy
fn clone(&self) -> ParsedPolicy
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 ParsedPolicy
impl Debug for ParsedPolicy
Source§impl PartialEq for ParsedPolicy
impl PartialEq for ParsedPolicy
Source§fn eq(&self, other: &ParsedPolicy) -> bool
fn eq(&self, other: &ParsedPolicy) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ParsedPolicy
Auto Trait Implementations§
impl Freeze for ParsedPolicy
impl RefUnwindSafe for ParsedPolicy
impl Send for ParsedPolicy
impl Sync for ParsedPolicy
impl Unpin for ParsedPolicy
impl UnsafeUnpin for ParsedPolicy
impl UnwindSafe for ParsedPolicy
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<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