Skip to main content

BindAcceptFactory

Type Alias BindAcceptFactory 

Source
pub type BindAcceptFactory = Arc<dyn Fn(TargetAddr) -> BoxFuture<'static, Result<BindAccept, BindAcceptFactoryError>> + Send + Sync>;
Expand description

The accept seam (ADR-004): the per-BIND accept factory — the DialFn’s mirror, injected at registration/assembly. Called once per TCP BIND with the requested target. The requested port is the only field a real bind can honor (domains are meaningless as bind addresses); the address policy is the factory’s (ADR-006/ADR-012: the callbacks refuse — RFC reply codes).

Failure mapping is two-stage (ADR-007): factory failure (BindAcceptFactoryError) → reply#1 with the mapped code; accept-stage failure (BindAcceptError) → reply#2 with the mapped code.

Aliased Type§

pub struct BindAcceptFactory { /* private fields */ }