pub struct RecordHeader {
pub kind: String,
pub capsule: String,
pub created_ms: u64,
pub truncated: Option<TruncationMarker>,
}Expand description
The first line of a record: a JSON object with a type key and no role.
Not a message: every reader of a record skips a line that is not a JSON object carrying a
string role, so a header is invisible to murmur:conversation/read, to the threaded
reload, and to the total a page reports. Not a sidecar: a sidecar needs a second write that
a crash could desynchronise from the rename, where a header makes the whole truncation
exactly one atomic rename of one file.
Self::capsule is what makes automatic record pruning store-safe: two capsules pointed at
one context.record_store each own only the records their own name is on.
Fields§
§kind: StringAlways [RECORD_HEADER_TYPE]. A first line carrying anything else is not a header.
capsule: StringThe capsule that owns this record — name: from its manifest, never the record store.
created_ms: u64When the header was written, in milliseconds since the epoch. On an adopted record, that is the adoption, not the conversation’s first message.
truncated: Option<TruncationMarker>Absent until this record has been truncated.
Trait Implementations§
Source§impl Clone for RecordHeader
impl Clone for RecordHeader
Source§impl Debug for RecordHeader
impl Debug for RecordHeader
Source§impl<'de> Deserialize<'de> for RecordHeader
impl<'de> Deserialize<'de> for RecordHeader
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>,
impl Eq for RecordHeader
Source§impl PartialEq for RecordHeader
impl PartialEq for RecordHeader
Source§impl Serialize for RecordHeader
impl Serialize for RecordHeader
impl StructuralPartialEq for RecordHeader
Auto Trait Implementations§
impl Freeze for RecordHeader
impl RefUnwindSafe for RecordHeader
impl Send for RecordHeader
impl Sync for RecordHeader
impl Unpin for RecordHeader
impl UnsafeUnpin for RecordHeader
impl UnwindSafe for RecordHeader
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more