pub struct Resource {
pub annotations: Option<Annotations>,
pub description: Option<String>,
pub mime_type: Option<String>,
pub name: String,
pub uri: String,
pub extra: Map<String, Value>,
}
Expand description
A known resource that the server is capable of reading.
Fields§
§annotations: Option<Annotations>
Optional annotations for the client.
description: Option<String>
A description of what this resource represents.
This can be used by clients to improve the LLM’s understanding of available resources. It can be thought of like a “hint” to the model.
mime_type: Option<String>
The MIME type of this resource, if known.
name: String
A human-readable name for this resource.
This can be used by clients to populate UI elements.
uri: String
The URI of this resource.
extra: Map<String, Value>
Additional parameters that are not part of the schema.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Resource
impl<'de> Deserialize<'de> for Resource
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
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 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