pub struct FurDocument {
pub schema: u32,
pub conversation_id: String,
pub title: String,
pub created_at: String,
pub updated_at: Option<String>,
pub tags: Vec<String>,
pub parents: Vec<String>,
pub children: Vec<String>,
pub messages: Vec<FurMessage>,
}Expand description
A whole conversation: front matter plus an ordered list of messages.
Messages are flat and their order is positional — the order they appear in
the document is the sequence. Structure between conversations lives in
parents / children; there is no structure within one.
Fields§
§schema: u32§conversation_id: String§title: String§created_at: String§updated_at: Option<String>§parents: Vec<String>Conversations this one draws on, by conversation_id.
children: Vec<String>Conversations that draw on this one, by conversation_id.
messages: Vec<FurMessage>Implementations§
Source§impl FurDocument
impl FurDocument
pub fn new( conversation_id: impl Into<String>, title: impl Into<String>, created_at: impl Into<String>, ) -> Self
Sourcepub fn effective_schema(&self) -> u32
pub fn effective_schema(&self) -> u32
Version this document must be written as.
A schema-1 document with no lineage stays schema 1, so archives written before this change re-serialize byte-identically. The moment it gains an edge it becomes schema 2, because a schema-1 reader would reject the new keys as unknown rather than reporting a version it cannot handle.
Trait Implementations§
Source§impl Clone for FurDocument
impl Clone for FurDocument
Source§impl Debug for FurDocument
impl Debug for FurDocument
impl Eq for FurDocument
Source§impl PartialEq for FurDocument
impl PartialEq for FurDocument
impl StructuralPartialEq for FurDocument
Auto Trait Implementations§
impl Freeze for FurDocument
impl RefUnwindSafe for FurDocument
impl Send for FurDocument
impl Sync for FurDocument
impl Unpin for FurDocument
impl UnsafeUnpin for FurDocument
impl UnwindSafe for FurDocument
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