Skip to main content

Module spec

Module spec 

Source
Expand description

The per-family descriptor table (plan more-providers.md, D1).

What used to be a dozen free functions each doing match family { Github, Gitlab, _ => None } is one FamilySpec per ApiFamily. The old public functions (pull_request_web_url, well_known_kind, new_pull_request_url, …) are one-line wrappers over spec_for, so no caller changed. A provider slice fills in only its own src/<provider>/spec.rs.

Pure on purpose: no I/O, and compiled whatever providers are built, so the URL helpers work in a no-network build.

Structs§

FamilySpec
Everything family-specific the app needs to know without a network call.
RemoteRef
A git remote, read by a family’s own parser.

Enums§

CheckoutSource
How to get the code of a pull request onto a local branch.

Functions§

default_owns_remote
Same hostname (port, www. and an api. prefix on a public host ignored).
default_parse_remote
remote_web_base, as a RemoteRef.
spec_for
The spec of family. Families whose provider is not built get the inert one, exactly as a family with no client yet.
web_base
The instance’s web root: the configured URL, or the kind’s fixed public host when none is set.