pub enum Content {
Text {
value: String,
},
ToolRef {
sha256: String,
path: String,
bytes: u64,
desc: String,
},
ImageRef {
sha256: String,
path: String,
desc: String,
},
}Expand description
Message body. ToolRef and ImageRef are content-addressed pointers
(spec §4.3 pointer substitution) to blobs stored under
~/.mur/conversations/blob/<sha256>.
Variants§
Implementations§
Source§impl Content
impl Content
Sourcepub fn as_text(&self) -> &str
pub fn as_text(&self) -> &str
Plain-text projection for indexing/search. For pointer variants
(ToolRef/ImageRef) returns the desc field, which may be an
empty string if the producer didn’t supply one — callers doing
keyword search should treat empty results as “no indexable text”
rather than treating them as matches.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Content
impl<'de> Deserialize<'de> for Content
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 Content
impl RefUnwindSafe for Content
impl Send for Content
impl Sync for Content
impl Unpin for Content
impl UnsafeUnpin for Content
impl UnwindSafe for Content
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