pub struct Record {Show 16 fields
pub id: RecordId,
pub kind: RecordKind,
pub schema_version: SchemaVersion,
pub title: String,
pub summary: Option<String>,
pub body: Option<String>,
pub times: RecordTimes,
pub actors: Vec<ActorRole>,
pub sources: Vec<SourceRef>,
pub relations: Vec<Relation>,
pub visibility: Visibility,
pub lifecycle: Lifecycle,
pub extensions: BTreeMap<String, ExtensionData>,
pub redactions: Vec<FieldPath>,
pub version: u64,
pub updated_at: Timestamp,
}Expand description
The common record envelope (current state).
Fields§
§id: RecordId§kind: RecordKind§schema_version: SchemaVersion§title: String§summary: Option<String>§body: Option<String>§times: RecordTimes§actors: Vec<ActorRole>§sources: Vec<SourceRef>§relations: Vec<Relation>§visibility: Visibility§lifecycle: Lifecycle§extensions: BTreeMap<String, ExtensionData>§redactions: Vec<FieldPath>Fields whose values were redacted (see ADR 0006).
version: u64Sequence number of the last applied event (starts at 1).
updated_at: TimestampRecorded time of the last applied event.
Implementations§
Source§impl Record
impl Record
pub fn extension_field(&self, namespace: &str, field: &str) -> Option<&ExtValue>
Sourcepub fn active_relations(&self) -> impl Iterator<Item = &Relation>
pub fn active_relations(&self) -> impl Iterator<Item = &Relation>
Active (non-retracted) relations.
pub fn actors_with_role<'a>( &'a self, role: &'a ActorRoleKind, ) -> impl Iterator<Item = &'a Attribution>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Record
impl<'de> Deserialize<'de> for Record
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 StructuralPartialEq for Record
Auto Trait Implementations§
impl Freeze for Record
impl RefUnwindSafe for Record
impl Send for Record
impl Sync for Record
impl Unpin for Record
impl UnsafeUnpin for Record
impl UnwindSafe for Record
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