pub struct Planner { /* private fields */ }Implementations§
Source§impl Planner
impl Planner
pub fn new() -> Self
Sourcepub fn set_enforcement(&mut self, enforcement: Arc<Mutex<EnforcementEngine>>)
pub fn set_enforcement(&mut self, enforcement: Arc<Mutex<EnforcementEngine>>)
Install a shared enforcement engine so commitments added via the CLI (or tests) are the exact same commitments the gate enforces.
Sourcepub fn enforcement(&self) -> Arc<Mutex<EnforcementEngine>> ⓘ
pub fn enforcement(&self) -> Arc<Mutex<EnforcementEngine>> ⓘ
Access the shared enforcement gate (e.g. to seed commitments).
pub fn add_goal( &self, name: &str, desc: &str, priority: u8, parent: Option<u64>, ) -> u64
pub fn get_goal(&self, id: u64) -> Option<Goal>
pub fn list_goals(&self, status: Option<GoalStatus>) -> Vec<Goal>
Sourcepub fn decompose_goal(&self, goal_id: u64) -> Vec<u64>
pub fn decompose_goal(&self, goal_id: u64) -> Vec<u64>
Cél lebontása részcélokra (HTN dekompozíció)
Sourcepub fn create_plan(&self, goal_id: u64) -> Plan
pub fn create_plan(&self, goal_id: u64) -> Plan
Terv készítése egy célhoz
Sourcepub fn execute_step(
&self,
plan_id: u64,
) -> Result<Option<Action>, EnforcementError>
pub fn execute_step( &self, plan_id: u64, ) -> Result<Option<Action>, EnforcementError>
Terv végrehajtásának előre léptetése a kötelező gate-en keresztül.
Sourcepub fn execute_step_with_override(
&self,
plan_id: u64,
justification: &str,
) -> Result<Option<Action>, EnforcementError>
pub fn execute_step_with_override( &self, plan_id: u64, justification: &str, ) -> Result<Option<Action>, EnforcementError>
A documented justifiedOverride() útvonal: ugyanaz a gate, de az
akció egy rögzített indoklással léphet (ha jogosult a felülírás).
Sourcepub fn fail_step(&self, plan_id: u64, reason: &str) -> bool
pub fn fail_step(&self, plan_id: u64, reason: &str) -> bool
Rollback: visszalépés az utolsó végrehajtott lépésről, ha az sikertelen volt.
Sourcepub fn replan(&self, plan_id: u64, reason: &str) -> Option<Plan>
pub fn replan(&self, plan_id: u64, reason: &str) -> Option<Plan>
Replanning: terv újragenerálás változott körülmények esetén
pub fn plans_for_goal(&self, goal_id: u64) -> Vec<Plan>
pub fn get_plan(&self, id: u64) -> Option<Plan>
pub fn stats(&self) -> (usize, usize, usize)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Planner
impl RefUnwindSafe for Planner
impl Send for Planner
impl Sync for Planner
impl Unpin for Planner
impl UnsafeUnpin for Planner
impl UnwindSafe for Planner
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
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§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> ⓘ
Converts
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> ⓘ
Converts
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