pub struct Icon {
pub src: String,
pub mime_type: Option<String>,
pub sizes: Option<Vec<String>>,
}Expand description
A URL pointing to an icon resource or a base64-encoded data URI.
Clients that support rendering icons MUST support at least the following MIME types:
- image/png - PNG images (safe, universal compatibility)
- image/jpeg (and image/jpg) - JPEG images (safe, universal compatibility)
Clients that support rendering icons SHOULD also support:
- image/svg+xml - SVG images (scalable but requires security precautions)
- image/webp - WebP images (modern, efficient format)
Fields§
§src: StringA standard URI pointing to an icon resource
mime_type: Option<String>Optional override if the server’s MIME type is missing or generic
sizes: Option<Vec<String>>Size specification, each string should be in WxH format (e.g., \"48x48\", \"96x96\") or \"any\" for scalable formats like SVG
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Icon
impl<'de> Deserialize<'de> for Icon
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl JsonSchema for Icon
impl JsonSchema for Icon
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreimpl 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 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