pub struct ColumnAssignment {
pub column: String,
pub index: i16,
pub retired: bool,
}Expand description
One source column’s pinned replicate index, as the API’s register response
reports it (and as stream metadata persists it under
replicates.assignments). Sync services assign each value’s
replicate_index by looking its source column up here.
Fields§
§column: String§index: i16§retired: boolThe source no longer sends this column. The index stays reserved and remains the column’s identity should it reappear.
Implementations§
Source§impl ColumnAssignment
impl ColumnAssignment
Sourcepub fn from_metadata(metadata: &Value) -> Option<Vec<Self>>
pub fn from_metadata(metadata: &Value) -> Option<Vec<Self>>
The mapping a stream’s metadata carries, resolved the way the API resolves it. None when the stream declares no replicate family.
Sourcepub fn resolve(pinned: Vec<Self>, source_columns: &[String]) -> Vec<Self>
pub fn resolve(pinned: Vec<Self>, source_columns: &[String]) -> Vec<Self>
The authoritative mapping, ordered by index: the assignments the API pinned, or, on a spec stored before pinning, each declared source column at its position, which is the index its readings were stored under. Both crates read an unpinned spec through here so that neither invents an index the other would not.
Trait Implementations§
Source§impl Clone for ColumnAssignment
impl Clone for ColumnAssignment
Source§fn clone(&self) -> ColumnAssignment
fn clone(&self) -> ColumnAssignment
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more