pub struct PromptAssembler;Expand description
Assembles the parity system prompt from its constituent sections.
Why: A named type gives call sites (the agent loop, the parity report) a
single, discoverable entry point and room to grow — e.g. to also surface the
per-section hashes the parity report records (spec D5) — without changing the
free-function signature callers already use.
What: A zero-sized struct whose PromptAssembler::assemble method forwards
to assemble_system_prompt. Holds no state, honouring the crate’s
no-global-state convention.
Test: prompt::tests::assembler_struct_matches_free_function.
Implementations§
Source§impl PromptAssembler
impl PromptAssembler
Sourcepub fn assemble(
&self,
config: &AgentConfig,
project_context: Option<&str>,
fallback_guidance: Option<&str>,
) -> String
pub fn assemble( &self, config: &AgentConfig, project_context: Option<&str>, fallback_guidance: Option<&str>, ) -> String
Assemble the system prompt for the given agent.
Why: Provides the OO-style entry point that mirrors the free function so
callers may hold an assembler instance if they prefer.
What: Delegates verbatim to assemble_system_prompt.
Test: prompt::tests::assembler_struct_matches_free_function.
Trait Implementations§
Source§impl Clone for PromptAssembler
impl Clone for PromptAssembler
Source§fn clone(&self) -> PromptAssembler
fn clone(&self) -> PromptAssembler
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for PromptAssembler
Source§impl Debug for PromptAssembler
impl Debug for PromptAssembler
Source§impl Default for PromptAssembler
impl Default for PromptAssembler
Source§fn default() -> PromptAssembler
fn default() -> PromptAssembler
Auto Trait Implementations§
impl Freeze for PromptAssembler
impl RefUnwindSafe for PromptAssembler
impl Send for PromptAssembler
impl Sync for PromptAssembler
impl Unpin for PromptAssembler
impl UnsafeUnpin for PromptAssembler
impl UnwindSafe for PromptAssembler
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> ⓘ
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> ⓘ
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