pub struct Policy {
pub version: Option<u64>,
pub context: ContextPolicy,
pub profiles: ProfilesPolicy,
pub session: SessionPolicy,
pub knowledge: KnowledgePolicy,
pub projections: Vec<Projection>,
pub server: ServerPolicy,
pub commit: CommitPolicy,
pub intent: IntentPolicy,
pub release: ReleasePolicy,
}Expand description
The policy, typed to what the projections consume. Every other key is carried through
unread: the policy schema under share/schemas/majordomus/policy/policy.v1.schema.json owns the full shape.
Fields§
§version: Option<u64>version:.
context: ContextPolicycontext:.
profiles: ProfilesPolicyprofiles:.
session: SessionPolicysession:.
knowledge: KnowledgePolicyknowledge:.
projections: Vec<Projection>projections:.
server: ServerPolicyserver: — the timings a lease contest between two processes is judged by. Absent
keeps the constants lease.rs declares, so a policy that predates the block, or one
that could not be read, does not silently change how a server is taken over.
commit: CommitPolicycommit: — what this repository holds a commit message to. Absent is the default,
which is what this repository’s own history already satisfies.
intent: IntentPolicyintent: — whether work must be bound to what it serves before it starts, and the
exemption classes a worker may give instead. Absent is off: a repository whose
policy predates the block starts work exactly as it did (ADR 0111).
release: ReleasePolicyrelease: — who raises the version and by at least how much (ADR 0134). Absent is
allocation: off with no floor: a repository whose policy predates the block raises
its version exactly as it did.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Policy
impl<'de> Deserialize<'de> for Policy
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for Policy
impl StructuralPartialEq for Policy
Auto Trait Implementations§
impl Freeze for Policy
impl RefUnwindSafe for Policy
impl Send for Policy
impl Sync for Policy
impl Unpin for Policy
impl UnsafeUnpin for Policy
impl UnwindSafe for Policy
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
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§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.