pub struct HierarchyPolicy { /* private fields */ }Expand description
Tier membership map for a fleet, enforcing the Orchestrator→Worker rule (P2-9).
Implementations§
Source§impl HierarchyPolicy
impl HierarchyPolicy
Sourcepub fn with_orchestrator(self, url: impl Into<String>) -> Self
pub fn with_orchestrator(self, url: impl Into<String>) -> Self
Mark an agent URL as an orchestrator.
Sourcepub fn with_worker(self, url: impl Into<String>) -> Self
pub fn with_worker(self, url: impl Into<String>) -> Self
Mark an agent URL as a worker.
Sourcepub fn tier(&self, url: &str) -> AgentTier
pub fn tier(&self, url: &str) -> AgentTier
The tier of an agent; unknown agents default to AgentTier::Worker
(least privilege).
Sourcepub fn check_delegation(&self, from: &str, to: &str) -> Result<(), ScaleError>
pub fn check_delegation(&self, from: &str, to: &str) -> Result<(), ScaleError>
Check that from is allowed to delegate to to.
Trait Implementations§
Source§impl Debug for HierarchyPolicy
impl Debug for HierarchyPolicy
Source§impl Default for HierarchyPolicy
impl Default for HierarchyPolicy
Source§fn default() -> HierarchyPolicy
fn default() -> HierarchyPolicy
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for HierarchyPolicy
impl RefUnwindSafe for HierarchyPolicy
impl Send for HierarchyPolicy
impl Sync for HierarchyPolicy
impl Unpin for HierarchyPolicy
impl UnsafeUnpin for HierarchyPolicy
impl UnwindSafe for HierarchyPolicy
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