Skip to main content

Crate gov_uk_rs_sdk

Crate gov_uk_rs_sdk 

Source
Expand description

GOV.UK / Companies House Rust SDK — umbrella crate with a small harness layer and workspace crates under crates/.

§Harness

§Examples

See examples/ (company_profile, search_companies). Run with a key in the environment:

cargo run -p gov-uk-rs-sdk --example company_profile

For local runs, copy .env.example to .env and set COMPANIES_HOUSE_API_KEY (see README).

Re-exports§

pub use gov_uk_ch_public_data as ch_public_data;
pub use gov_uk_ch_document as ch_document;

Modules§

harness
Application harness: stable success (ApiResponse), error (ApiError), and request (ApiRequest) types.
prelude
Commonly used symbols: core, harness, and enabled product crates.

Structs§

ApiMessage
A best-effort capture of Companies House / GOV.UK API error payload fields.
ChDeprecation
Deprecation metadata from CH-Expiry-Date (Companies House).
Method
The Request Method (VERB)
NegotiatedResponse
SdkClient
HTTP client with shared auth, optional CH rate limit, and base URL.
SdkClientBuilder
Build a configured SdkClient.
SdkRequest
In-flight request: set headers/body then call SdkRequest::send_json or SdkRequest::send_empty.

Enums§

Auth
Credentials applied to every request by SdkClient.
SdkBuildError
SdkError
Validation
validation= parameter for vendor Content-Type on Companies House writes.

Constants§

COMPANIES_HOUSE_API_ROOT
Default base URL for the Companies House REST API.

Functions§

vendor_content_type
Build a Companies House vendor Content-Type value including version= and validation=.

Type Aliases§

SdkResult
Standard result type for SDK operations.