pub struct TextRenderer;Expand description
Renders a service projection to conversational plain text.
Dispatches on the primary intent (by index in ctx.intent_index), applies
guard filtering via ctx.evaluated_guards, and respects ctx.verbosity.
Returns Err(Error::NoIntents) when the intent slice is empty or the index
is out of bounds.
Trait Implementations§
Source§impl Renderer for TextRenderer
impl Renderer for TextRenderer
Source§type Context = BaseContext
type Context = BaseContext
The context type consumed by this renderer. Must implement
Default.Source§fn render(
&self,
service: &ServiceDef,
intents: &[IntentScore],
ctx: &BaseContext,
) -> Result<String, Error>
fn render( &self, service: &ServiceDef, intents: &[IntentScore], ctx: &BaseContext, ) -> Result<String, Error>
Renders a service definition into the renderer’s output type. Read more
Auto Trait Implementations§
impl Freeze for TextRenderer
impl RefUnwindSafe for TextRenderer
impl Send for TextRenderer
impl Sync for TextRenderer
impl Unpin for TextRenderer
impl UnsafeUnpin for TextRenderer
impl UnwindSafe for TextRenderer
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