Skip to main content

TransportProbe

Type Alias TransportProbe 

Source
pub type TransportProbe = Arc<dyn Fn(&dyn Config) -> bool + Send + Sync>;
Expand description

Answers “did this venture wire at least one push transport?” for the production readiness check.

The module cannot answer it itself. The push environment has exactly one reader — cratefield-push-wiring (#191), enforced by a guard over the whole workspace — because six places reading the variable names is six chances to drift on one, and the drift is invisible: the doctor reports a healthy deployment while every Android send answers NotConfigured. Depending on that crate is not the way out either: it pulls all three push adapters, and this module must compile the same whether a venture wires zero or three.

So the venture, which already has the reader, passes the question in:

ⓘ
Notifications::new()
    .transport_probe(|cfg| cratefield::push_wiring::inspect_push(cfg).any_routed())

With no probe the check is skipped and fz doctor is the only half that runs — which is why the builder documents it and examples/venture wires it.

Aliased Type§

pub struct TransportProbe { /* private fields */ }