pub struct MessagePart {
pub id: Uuid,
pub message_id: Uuid,
pub part_type: MessagePartType,
pub content: Value,
pub number: u32,
pub file_citations: Vec<FileCitation>,
pub link_citations: Vec<LinkCitation>,
pub references: Vec<LinkReference>,
}Expand description
A persisted, ordered fragment of a message body.
A message owns one or more parts; the parts in number order are the
message body. Persisted in the message_parts table with a CASCADE foreign
key to messages (see DESIGN cpt-cf-chat-engine-design-entity-message-part).
Fields§
§id: UuidUnique part identifier (primary key).
message_id: UuidMessage this part belongs to.
part_type: MessagePartTypeDiscriminates the content shape.
content: ValueTyped payload; shape determined by part_type.
number: u320-based ordinal within the message; unique per message.
file_citations: Vec<FileCitation>Document citations attached to this part (only text parts carry these).
link_citations: Vec<LinkCitation>Web-page citations attached to this part.
references: Vec<LinkReference>Lightweight URL references attached to this part.
Implementations§
Trait Implementations§
Source§impl Clone for MessagePart
impl Clone for MessagePart
Source§fn clone(&self) -> MessagePart
fn clone(&self) -> MessagePart
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 MessagePart
impl Debug for MessagePart
Source§impl<'de> Deserialize<'de> for MessagePart
impl<'de> Deserialize<'de> for MessagePart
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 MessagePart
impl RefUnwindSafe for MessagePart
impl Send for MessagePart
impl Sync for MessagePart
impl Unpin for MessagePart
impl UnsafeUnpin for MessagePart
impl UnwindSafe for MessagePart
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