pub struct Policy {
pub routes: Vec<Route>,
}Fields§
§routes: Vec<Route>Implementations§
Source§impl Policy
impl Policy
Sourcepub fn route(&self, s: &Subject<'_>) -> Option<&Route>
pub fn route(&self, s: &Subject<'_>) -> Option<&Route>
The first route whose every stated condition holds. Order is the policy: a document is read top to bottom, like the file it came from.
Sourcepub fn names_node(&self, node: &str, edits: bool) -> bool
pub fn names_node(&self, node: &str, edits: bool) -> bool
Whether any route names this node. A read node needs one that states
no class or complexity; an edit needs one of any kind. Tier and lap
are left out: whether a route can serve a node at all is the question.
Sourcepub fn route_read(
&self,
node: &str,
lap: i64,
tier: Option<u8>,
) -> Option<&Route>
pub fn route_read( &self, node: &str, lap: i64, tier: Option<u8>, ) -> Option<&Route>
The first route serving a workflow node that changes no repository.
Class and complexity describe a change, so a route stating either
serves only edit nodes and tasks.
Trait Implementations§
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
Mutably borrows from an owned value. Read more