#[non_exhaustive]pub struct Source {
pub uri: String,
pub loader: String,
pub fetched_at: DateTime<Utc>,
pub etag: Option<String>,
}Expand description
Where a Document originated. Survives every split and chunker
pass — the leaf chunk knows the source URI of the parent
document and which loader produced it.
etag enables idempotent re-ingestion: pipelines compare the
loader-reported etag against the stored value and skip
reprocessing when unchanged. Loaders that lack a natural etag
(in-memory, ephemeral) leave it None and the pipeline falls
back to time-based deduplication.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.uri: StringURI of the source — file:///path, s3://bucket/key,
notion://workspace/page-id, etc. Pipelines treat this as
opaque; loaders define the scheme.
loader: StringStable identifier of the loader implementation. "web",
"s3", "notion", etc. — used for dashboards and replay
routing, not for behaviour gating. Carried as String
(rather than &'static str) so persisted documents
reconstruct via serde without forcing every loader name to
be a string literal.
fetched_at: DateTime<Utc>When the loader fetched this document. Pipelines stamp this at fetch time so re-ingestion ages-out properly.
etag: Option<String>Optional content-version tag the source surfaces (HTTP
ETag, S3 object etag, Notion last_edited_time hash).
None when the source has no natural content-versioning
signal.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Source
impl<'de> Deserialize<'de> for Source
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 Source
impl StructuralPartialEq for Source
Auto Trait Implementations§
impl Freeze for Source
impl RefUnwindSafe for Source
impl Send for Source
impl Sync for Source
impl Unpin for Source
impl UnsafeUnpin for Source
impl UnwindSafe for Source
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,
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<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