pub struct ResourceContent {
pub uri: String,
pub mime_type: Option<String>,
pub text: Option<String>,
pub blob: Option<String>,
}Expand description
Content of a resource, either text or binary (base64-encoded).
Matches the MCP resources/read response format:
- Text content:
{ "uri", "mimeType?", "text" } - Binary content:
{ "uri", "mimeType?", "blob" }(base64)
Fields§
§uri: StringResource URI
mime_type: Option<String>Optional MIME type
text: Option<String>Text content (use for UTF-8 text)
blob: Option<String>Base64-encoded binary content (use for binary data)
Implementations§
Source§impl ResourceContent
impl ResourceContent
Trait Implementations§
Source§impl Clone for ResourceContent
impl Clone for ResourceContent
Source§fn clone(&self) -> ResourceContent
fn clone(&self) -> ResourceContent
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 moreAuto Trait Implementations§
impl Freeze for ResourceContent
impl RefUnwindSafe for ResourceContent
impl Send for ResourceContent
impl Sync for ResourceContent
impl Unpin for ResourceContent
impl UnsafeUnpin for ResourceContent
impl UnwindSafe for ResourceContent
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