pub struct ResourceTableRenderer {
pub max_description_width: usize,
pub show_mime_type: bool,
/* private fields */
}Expand description
Renders resource registry as beautiful tables.
Fields§
§max_description_width: usizeMaximum width for description column
show_mime_type: boolWhether to show MIME type column
Implementations§
Source§impl ResourceTableRenderer
impl ResourceTableRenderer
Sourcepub fn new(context: DisplayContext) -> Self
pub fn new(context: DisplayContext) -> Self
Create a new renderer with explicit display context.
Sourcepub fn render(&self, resources: &[Resource], console: &FastMcpConsole)
pub fn render(&self, resources: &[Resource], console: &FastMcpConsole)
Render a collection of resources as a table.
Sourcepub fn render_detail(&self, resource: &Resource, console: &FastMcpConsole)
pub fn render_detail(&self, resource: &Resource, console: &FastMcpConsole)
Render a single resource in detail.
Sourcepub fn render_tree(&self, resources: &[Resource], console: &FastMcpConsole)
pub fn render_tree(&self, resources: &[Resource], console: &FastMcpConsole)
Render resources as a tree grouped by URI prefix/scheme.
Resources are grouped by their URI scheme (file://, config://, db://, etc.) and displayed in a hierarchical tree structure.
Trait Implementations§
Source§impl Clone for ResourceTableRenderer
impl Clone for ResourceTableRenderer
Source§fn clone(&self) -> ResourceTableRenderer
fn clone(&self) -> ResourceTableRenderer
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 ResourceTableRenderer
impl Debug for ResourceTableRenderer
Auto Trait Implementations§
impl Freeze for ResourceTableRenderer
impl RefUnwindSafe for ResourceTableRenderer
impl Send for ResourceTableRenderer
impl Sync for ResourceTableRenderer
impl Unpin for ResourceTableRenderer
impl UnwindSafe for ResourceTableRenderer
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).