Creates an attribute that is controlled by a source and thus can not be transacted upon by clients.
(
&mut self,
name: &str,
config: AttributeConfig,
pairs: &Stream<S, ((Value, Value), T, isize)>,
)
| 226 | /// Creates an attribute that is controlled by a source and thus |
| 227 | /// can not be transacted upon by clients. |
| 228 | pub fn create_sourced_attribute<S: Scope + ScopeParent<Timestamp = T>>( |
| 229 | &mut self, |
| 230 | name: &str, |
| 231 | config: AttributeConfig, |
| 232 | pairs: &Stream<S, ((Value, Value), T, isize)>, |
| 233 | ) -> Result<(), Error> { |
| 234 | // We need to install a probe on source-fed attributes in |
| 235 | // order to determine their progress. |
| 236 | |
| 237 | // We do not want to probe timeless attributes. |
| 238 | // Sources of timeless attributes either are not able to or do not |
| 239 | // want to provide valid domain timestamps. |
| 240 | // Forcing to probe them would stall progress in the system. |
| 241 | let source_pairs = if config.timeless { |
| 242 | pairs.to_owned() |
| 243 | } else { |
| 244 | self.probed_source_count += 1; |
| 245 | pairs.probe_with(&mut self.domain_probe) |
| 246 | }; |
| 247 | |
| 248 | self.create_attribute(name, config, &source_pairs)?; |
| 249 | |
| 250 | Ok(()) |
| 251 | } |
| 252 | |
| 253 | /// Inserts a new named relation. |
| 254 | pub fn register_arrangement( |