struct SourceObservationEntry {
binding: SourceBinding,
_watcher: RecommendedWatcher,
receiver: Mutex<Receiver<Event>>,
ingress_sequence: Arc<AtomicU64>,
continuity_lost: Arc<AtomicBool>,
reconcile: Mutex<()>,
state: Mutex<ObservationState>,
}Expand description
Concrete watcher and state for one exact source binding.
Fields§
§binding: SourceBindingExact source, database, and configuration identity.
_watcher: RecommendedWatcherNative watcher kept alive for the entry lifetime.
receiver: Mutex<Receiver<Event>>Bounded watcher event receiver drained during reconciliation.
ingress_sequence: Arc<AtomicU64>Monotonic count of relevant events accepted by the callback.
continuity_lost: Arc<AtomicBool>Whether overflow, disconnection, or rescan invalidated event continuity.
reconcile: Mutex<()>Serializes exact verification and epoch installation for this binding.
state: Mutex<ObservationState>Current process-local verified epoch.
Implementations§
Source§impl SourceObservationEntry
impl SourceObservationEntry
Sourcefn start(binding: SourceBinding) -> Result<Self, CliError>
fn start(binding: SourceBinding) -> Result<Self, CliError>
Start a bounded native watcher for one source binding.
Sourcefn invalidate(&self)
fn invalidate(&self)
Discard the current verified epoch after any uncertainty.
Sourcefn clear_before_exact_verification(&self) -> Result<(), CliError>
fn clear_before_exact_verification(&self) -> Result<(), CliError>
Reset continuity and drain events before sampling exact source truth.
Sourcefn changed_since_exact_verification(
&self,
scan_options: &ScanOptions,
) -> Result<bool, CliError>
fn changed_since_exact_verification( &self, scan_options: &ScanOptions, ) -> Result<bool, CliError>
Return whether any potentially relevant event arrived since exact truth was sampled.
Sourcefn install_epoch(
&self,
process_nonce: [u8; 16],
binding: &CapturedProjectBinding,
generation: IndexGeneration,
ingress_sequence: u64,
contract_fingerprint: String,
policy_witness: String,
) -> Result<VerifiedSourceEpoch, CliError>
fn install_epoch( &self, process_nonce: [u8; 16], binding: &CapturedProjectBinding, generation: IndexGeneration, ingress_sequence: u64, contract_fingerprint: String, policy_witness: String, ) -> Result<VerifiedSourceEpoch, CliError>
Install a new verified epoch after exact source and policy reconciliation.
Sourcefn current_epoch(&self) -> Result<Option<VerifiedSourceEpoch>, CliError>
fn current_epoch(&self) -> Result<Option<VerifiedSourceEpoch>, CliError>
Clone the current verified epoch without holding the state lock.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for SourceObservationEntry
impl RefUnwindSafe for SourceObservationEntry
impl Send for SourceObservationEntry
impl Sync for SourceObservationEntry
impl Unpin for SourceObservationEntry
impl UnwindSafe for SourceObservationEntry
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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