ResourceContents

The contents of a resource read: either UTF-8 text or base64 blob.

@safe
struct ResourceContents {
string uri;
string mimeType;
bool isBlob;
string text;
string blob;
}

Members

Functions

forVersion
ResourceContents forVersion(ProtocolVersion v)

Return a copy projected to the negotiated protocol version. Per-content _meta was introduced by 2025-06-18 ("Add _meta to additional interface types"), so it is dropped for an older peer. uri/mimeType/text/blob all existed in 2024-11-05 and are preserved unchanged. Mirrors the content-level _meta stripping in Content.forVersion.

Mixed In Members

From mixin MetaField

meta
Json meta;

optional _meta object