pub trait Source {
type Id: Copy + Eq + HashWork;
type Document: Copy + Eq;
type Generation: Copy + Eq;
// Required method
fn snapshot(&self) -> Snapshot<Self::Document, Self::Generation>;
}Expand description
A source owner’s stable identities, independent of its document model.
An XML owner implements it over element identities, a CMS or PDF owner over its own attribute, object or revision identities. Nothing here reads the source; long-term validation only compares identities and generations.
Required Associated Types§
Sourcetype Id: Copy + Eq + HashWork
type Id: Copy + Eq + HashWork
Stable node identity scoped to this document, independent of a borrow.
Its trusted HashWork bound covers all hashing/equality bytes so identity
indexes can admit their complete work before querying attacker input.
Sourcetype Generation: Copy + Eq
type Generation: Copy + Eq
Exact document generation.
Required Methods§
Sourcefn snapshot(&self) -> Snapshot<Self::Document, Self::Generation>
fn snapshot(&self) -> Snapshot<Self::Document, Self::Generation>
Returns identity/generation in constant time, without allocation or I/O.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".