pub struct DisplayConfig {
pub display_name: String,
pub display_title: Box<dyn Fn(&HashMap<String, Value>) -> String + Sync + Send>,
pub display_content: Box<dyn Fn(&HashMap<String, Value>, &str) -> DisplayResult + Sync + Send>,
}Expand description
Configuration for how a tool should be displayed in the UI.
Fields§
§display_name: StringUI-friendly name (e.g., “Web Search” vs “web_search”).
display_title: Box<dyn Fn(&HashMap<String, Value>) -> String + Sync + Send>Dynamic title based on input (e.g., “AWS/DynamoDB” for tool input).
display_content: Box<dyn Fn(&HashMap<String, Value>, &str) -> DisplayResult + Sync + Send>Dynamic content based on input and result.
Implementations§
Source§impl DisplayConfig
impl DisplayConfig
Sourcepub fn default_for(name: &str) -> DisplayConfig
pub fn default_for(name: &str) -> DisplayConfig
Create a default display config for a tool.
Auto Trait Implementations§
impl !RefUnwindSafe for DisplayConfig
impl !UnwindSafe for DisplayConfig
impl Freeze for DisplayConfig
impl Send for DisplayConfig
impl Sync for DisplayConfig
impl Unpin for DisplayConfig
impl UnsafeUnpin for DisplayConfig
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> 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>
Converts
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>
Converts
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