pub struct DisplayConfig {
pub display_name: String,
pub display_title: Box<dyn Fn(&HashMap<String, Value>) -> String + Send + Sync>,
pub display_content: Box<dyn Fn(&HashMap<String, Value>, &str) -> DisplayResult + Send + Sync>,
}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 + Send + Sync>Dynamic title based on input (e.g., “AWS/DynamoDB” for tool input).
display_content: Box<dyn Fn(&HashMap<String, Value>, &str) -> DisplayResult + Send + Sync>Dynamic content based on input and result.
Implementations§
Source§impl DisplayConfig
impl DisplayConfig
Sourcepub fn default_for(name: &str) -> Self
pub fn default_for(name: &str) -> Self
Create a default display config for a tool.
Auto Trait Implementations§
impl Freeze for DisplayConfig
impl !RefUnwindSafe for DisplayConfig
impl Send for DisplayConfig
impl Sync for DisplayConfig
impl Unpin for DisplayConfig
impl !UnwindSafe 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