Expand description
Connect RPC adapter primitives for api-bones services (ADR-0096).
This crate re-exports the api_bones::connect module surface for
consumers who want a dedicated dependency rather than enabling the
connect feature on api-bones directly.
§Usage
[dependencies]
api-bones-connect = "0.1"ⓘ
use api_bones_connect::{
DomainErrorKind, IntoDomainErrorKind, domain_to_connect,
chrono_to_timestamp, parse_uuid, build_page, ConnectOptionExt as _,
};Structs§
- Offset
Page - Normalized offset-page result.
Enums§
- Domain
Error Kind - Canonical error-kind shape for domain errors that need to cross the Connect RPC boundary.
Constants§
- DEFAULT_
LIMIT - Brefwiz standard default page size.
- MAX_
LIMIT - Brefwiz standard maximum page size.
Traits§
- Connect
Option Ext - Extension trait on
Result<Option<T>, E>for ergonomic not-found shaping. - Into
Domain Error Kind - Implement this trait on your service’s domain error type to unlock the
generic
domain_to_connectmapper.
Functions§
- build_
offset_ page - Normalize inputs and build an
OffsetPage. - build_
page build_offset_pagewith brefwiz standard defaults (default=20, max=200).- chrono_
opt_ to_ timestamp - Convert an
Option<DateTime<Utc>>to an optional proto Timestamp. - chrono_
to_ timestamp - Convert a
chrono::DateTime<Utc>to a [google.protobuf.Timestamp]. - domain_
to_ connect - Map any domain error implementing
IntoDomainErrorKindto aConnectError. - parse_
uuid - Parse a UUID string, returning
ConnectError::invalid_argumenton failure.