pub struct RecordProvenance {
pub version: u32,
pub source_id: String,
pub source_uri: Option<String>,
pub stream_id: Option<String>,
pub sequence: Option<u64>,
}Expand description
Generic source lineage for one crate::SpatialRecord.
The contract deliberately stays independent of ROS, MCAP, Arrow, and
model runtimes. Adapters may identify their storage in source_uri and
their logical channel in stream_id; chunk-producing adapters can attach a
deterministic source sequence without changing the point schema.
Fields§
§version: u32Contract version for this provenance envelope.
source_id: StringStable logical source identity.
source_uri: Option<String>Optional local path or URI from which the record was read.
stream_id: Option<String>Optional logical stream, topic, or channel within the source.
sequence: Option<u64>Optional deterministic source sequence for this record or chunk.
Implementations§
Source§impl RecordProvenance
impl RecordProvenance
Sourcepub fn try_new(source_id: impl Into<String>) -> RecordsResult<Self>
pub fn try_new(source_id: impl Into<String>) -> RecordsResult<Self>
Creates a validated envelope with a non-empty source identity.
Sourcepub fn validate(&self) -> RecordsResult<()>
pub fn validate(&self) -> RecordsResult<()>
Validates the version and required identity fields.
Sourcepub fn with_source_uri(self, source_uri: impl Into<String>) -> Self
pub fn with_source_uri(self, source_uri: impl Into<String>) -> Self
Attaches a source path or URI.
Sourcepub fn with_stream_id(self, stream_id: impl Into<String>) -> Self
pub fn with_stream_id(self, stream_id: impl Into<String>) -> Self
Attaches a logical stream, topic, or channel.
Sourcepub const fn with_sequence(self, sequence: Option<u64>) -> Self
pub const fn with_sequence(self, sequence: Option<u64>) -> Self
Attaches a deterministic source sequence.
Sourcepub const fn without_sequence(self) -> Self
pub const fn without_sequence(self) -> Self
Removes a source sequence when an operation aggregates multiple inputs.
Trait Implementations§
Source§impl Clone for RecordProvenance
impl Clone for RecordProvenance
Source§fn clone(&self) -> RecordProvenance
fn clone(&self) -> RecordProvenance
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for RecordProvenance
impl Debug for RecordProvenance
Source§impl Default for RecordProvenance
impl Default for RecordProvenance
Source§impl<'de> Deserialize<'de> for RecordProvenance
impl<'de> Deserialize<'de> for RecordProvenance
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>,
Source§impl PartialEq for RecordProvenance
impl PartialEq for RecordProvenance
Source§fn eq(&self, other: &RecordProvenance) -> bool
fn eq(&self, other: &RecordProvenance) -> bool
self and other values to be equal, and is used by ==.