pub struct ChildContext<'a> { /* private fields */ }Expand description
What spawn knows about a delegation when it consults the child policy.
Accessors rather than public fields, so the context can grow a fact without breaking every policy already written against it.
Implementations§
Source§impl<'a> ChildContext<'a>
impl<'a> ChildContext<'a>
Sourcepub fn prompt(&self) -> &str
pub fn prompt(&self) -> &str
The task the parent is delegating, exactly as the child will read it.
Sourcepub fn parent_agent_id(&self) -> &str
pub fn parent_agent_id(&self) -> &str
The persisted agent id of the delegating parent.
Sourcepub fn workspace_dir(&self) -> &Path
pub fn workspace_dir(&self) -> &Path
The delegating agent’s working directory — its workspace root, unless a host moved it.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for ChildContext<'a>
impl<'a> RefUnwindSafe for ChildContext<'a>
impl<'a> Send for ChildContext<'a>
impl<'a> Sync for ChildContext<'a>
impl<'a> Unpin for ChildContext<'a>
impl<'a> UnsafeUnpin for ChildContext<'a>
impl<'a> UnwindSafe for ChildContext<'a>
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