pub struct Icon {
pub src: String,
pub mime_type: Option<String>,
pub sizes: Option<Vec<String>>,
pub theme: Option<IconTheme>,
}Expand description
Core MCP protocol types and error handling Icon for tools, resources, prompts, and implementations. Icons are display hints — most implementations do not need icons. See MCP spec
Fields§
§src: StringIcon source URL (data: URI or https:// URL)
mime_type: Option<String>MIME type of the icon (e.g., “image/png”, “image/svg+xml”)
sizes: Option<Vec<String>>Icon sizes (e.g., [“16x16”, “32x32”])
theme: Option<IconTheme>Theme preference for this icon
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Icon
impl<'de> Deserialize<'de> for Icon
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Icon, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Icon, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for Icon
impl Serialize for Icon
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for Icon
Auto Trait Implementations§
impl Freeze for Icon
impl RefUnwindSafe for Icon
impl Send for Icon
impl Sync for Icon
impl Unpin for Icon
impl UnsafeUnpin for Icon
impl UnwindSafe for Icon
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