pub enum ContentPart {
Text(TextPayload),
Media(MediaRef),
Sealed(SealedPart),
}Expand description
One content atom inside a BlockContent::Message block: ordered,
identity-free, sharing the block’s envelope. New modalities arrive
as new variants (additive); media bytes stay out of facts forever.
Exhaustive on purpose, like BlockContent. A new part is additive only
in the serde sense: stored material written before it still reads. In Rust
it is a breaking change, because a wildcard arm in a renderer would drop
the new part without a trace.
Variants§
Text(TextPayload)
Plain text; provider role assignment stays the renderer’s job.
Media(MediaRef)
A media reference; bytes never enter facts.
Sealed(SealedPart)
A model-issued wire item the kernel carries and never interprets.
Trait Implementations§
Source§impl Clone for ContentPart
impl Clone for ContentPart
Source§impl Debug for ContentPart
impl Debug for ContentPart
Source§impl<'de> Deserialize<'de> for ContentPart
impl<'de> Deserialize<'de> for ContentPart
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 Eq for ContentPart
Source§impl PartialEq for ContentPart
impl PartialEq for ContentPart
Source§impl Serialize for ContentPart
impl Serialize for ContentPart
impl StructuralPartialEq for ContentPart
Auto Trait Implementations§
impl Freeze for ContentPart
impl RefUnwindSafe for ContentPart
impl Send for ContentPart
impl Sync for ContentPart
impl Unpin for ContentPart
impl UnsafeUnpin for ContentPart
impl UnwindSafe for ContentPart
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