Module wire_conv

Module wire_conv 

Source
Expand description

Conversions between wire types (manta-shared) and backend types (manta-backend-dispatcher).

Lives server-side because manta-shared has no knowledge of the backend crates. Orphan rules prevent us from writing impl From<MantaError> for BackendError (both types are foreign to this crate), so we expose a free function used at call sites via .map_err(wire_conv::to_backend)?.

A NodeDetails conversion isn’t needed in-process: the type boundary is HTTP, and the JSON wire shape is identical between csm_rs::node::types::NodeDetails and manta_shared::shared::dto::NodeDetails.

Functions§

to_backend
Map a MantaError (returned by manta-shared’s pure helpers) onto the structured BackendError that the server’s service layer uses.