pub struct EmptyResourceContents {
pub uri: Uri,
pub title: Option<String>,
pub mime: Option<String>,
pub annotations: Option<Annotations>,
pub meta: Option<Value>,
}Expand description
Represents an empty/unknown resource content
Fields§
§uri: UriThe URI of the resource.
title: Option<String>Intended for UI and end-user contexts - optimized to be human-readable and easily understood, even by those unfamiliar with domain-specific terminology.
If not provided, the name should be used for display (except for Tool,
where annotations.title should be given precedence over using name, if present).
mime: Option<String>The MIME type of content.
annotations: Option<Annotations>Optional annotations for the client.
meta: Option<Value>Metadata reserved by MCP for protocol-level metadata.
Implementations§
Source§impl EmptyResourceContents
impl EmptyResourceContents
Sourcepub fn with_mime(self, mime: impl Into<String>) -> Self
pub fn with_mime(self, mime: impl Into<String>) -> Self
Sets the mime type of the blob resource content
Sourcepub fn with_title(self, title: impl Into<String>) -> Self
pub fn with_title(self, title: impl Into<String>) -> Self
Sets the title of the resource
Sourcepub fn with_annotations<F>(self, config: F) -> Self
pub fn with_annotations<F>(self, config: F) -> Self
Sets annotations for the client
Trait Implementations§
Source§impl Clone for EmptyResourceContents
impl Clone for EmptyResourceContents
Source§fn clone(&self) -> EmptyResourceContents
fn clone(&self) -> EmptyResourceContents
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for EmptyResourceContents
impl Debug for EmptyResourceContents
Source§impl<'de> Deserialize<'de> for EmptyResourceContents
impl<'de> Deserialize<'de> for EmptyResourceContents
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
Auto Trait Implementations§
impl Freeze for EmptyResourceContents
impl RefUnwindSafe for EmptyResourceContents
impl Send for EmptyResourceContents
impl Sync for EmptyResourceContents
impl Unpin for EmptyResourceContents
impl UnsafeUnpin for EmptyResourceContents
impl UnwindSafe for EmptyResourceContents
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