Skip to main content

ResolverFn

Type Alias ResolverFn 

Source
pub type ResolverFn<'a> = &'a (dyn Fn(Keyword, &mut IpSet) -> Result<(), IpParseError> + Sync);
Expand description

Expands a Keyword into the addresses it stands for.

Supplied by the caller, since answering reads the host’s interface table. Writes into the set it is given, so a keyword mixed with literal targets accumulates alongside them.

A borrowed dyn Fn, so a resolver may close over state such as an interface table read once; it stays Copy, so TargetContext does too.

Sync, so a & to one is Send and a caller can hold the context across an await in a spawned task.