pub struct PromptTableRenderer {
pub max_description_width: usize,
pub show_arguments: bool,
/* private fields */
}Expand description
Renders prompt registry as beautiful tables.
Fields§
§max_description_width: usizeMaximum width for description column
show_arguments: boolWhether to show argument counts
Implementations§
Source§impl PromptTableRenderer
impl PromptTableRenderer
Sourcepub fn new(context: DisplayContext) -> Self
pub fn new(context: DisplayContext) -> Self
Create a new renderer with explicit display context.
Sourcepub fn render(&self, prompts: &[Prompt], console: &FastMcpConsole)
pub fn render(&self, prompts: &[Prompt], console: &FastMcpConsole)
Render a collection of prompts as a table.
Sourcepub fn render_detail(&self, prompt: &Prompt, console: &FastMcpConsole)
pub fn render_detail(&self, prompt: &Prompt, console: &FastMcpConsole)
Render a single prompt in detail.
Trait Implementations§
Source§impl Clone for PromptTableRenderer
impl Clone for PromptTableRenderer
Source§fn clone(&self) -> PromptTableRenderer
fn clone(&self) -> PromptTableRenderer
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PromptTableRenderer
impl Debug for PromptTableRenderer
Auto Trait Implementations§
impl Freeze for PromptTableRenderer
impl RefUnwindSafe for PromptTableRenderer
impl Send for PromptTableRenderer
impl Sync for PromptTableRenderer
impl Unpin for PromptTableRenderer
impl UnwindSafe for PromptTableRenderer
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
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: NoopSpan) -> Self
fn instrument(self, _span: NoopSpan) -> Self
Instruments this future with a span (no-op when disabled).
Source§fn in_current_span(self) -> Self
fn in_current_span(self) -> Self
Instruments this future with the current span (no-op when disabled).