pub struct Resource {
pub uri: PrimitiveId,
pub name: String,
pub title: Option<String>,
pub description: Option<String>,
pub mime_type: Option<String>,
pub size: Option<u64>,
pub annotations: Option<Annotations>,
pub icons: Option<Vec<ResourceIcon>>,
pub extensions: Extensions,
}Expand description
A resource the server can read.
name and uri are required by every revision. A resource is keyed in the
registry by its uri, not its name: resources/read takes a uri, and two
resources may share a name.
Fields§
§uri: PrimitiveIduri. Required. Also the registry’s key for this primitive.
name: Stringname. Required.
title: Option<String>title. 2026-07-28.
description: Option<String>description. Every revision.
mime_type: Option<String>mimeType. Every revision.
size: Option<u64>size, in bytes, when known. 2026-07-28.
annotations: Option<Annotations>annotations. Every revision, and the same shape as a content block’s.
icons: Option<Vec<ResourceIcon>>icons. 2026-07-28.
extensions: Extensions_meta and any field a later revision adds.
Implementations§
Trait Implementations§
impl StructuralPartialEq for Resource
Auto Trait Implementations§
impl Freeze for Resource
impl RefUnwindSafe for Resource
impl Send for Resource
impl Sync for Resource
impl Unpin for Resource
impl UnsafeUnpin for Resource
impl UnwindSafe for Resource
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