pub fn last_with_default(
core: &Core,
source: NodeId,
default: HandleId,
) -> Result<FlowRegistration, OperatorFactoryError>Expand description
last_with_default(source, default) — buffers the latest DATA;
emits Data(latest) then Complete on upstream COMPLETE. On empty
stream (no DATA arrived), emits Data(default) then Complete.
Core takes one retain on default for the
LastState’s lifetime; the
caller should retain a share for themselves if they want to
reference the handle elsewhere.
§Errors
OperatorFactoryError::ZeroDefault—default == NO_HANDLE. Uselastfor the no-default behavior instead.OperatorFactoryError::Register— Core-layer registration error (unknown / terminal-non-resubscribablesource).