Files
nym/common/http-api-common/src/lib.rs
T
Jędrzej Stuczyński 8730a84a8e feat: nym-api bincode + yaml support (#5745)
* introduce 'Bincode' variant for FormattedResponse

* allow nym-api to return responses in bincode (and also yaml)

* client parsing support

* cargo fmt

* missing changes to nym-api tests

* fixed node status api build + adjusted NymApiClient construction

* NMv2 fixes + further api changes

* feature-locking http-api-common to fix wasm build
2025-05-09 10:11:22 +01:00

22 lines
593 B
Rust

// Copyright 2023-2025 - Nym Technologies SA <contact@nymtech.net>
// SPDX-License-Identifier: Apache-2.0
#[cfg(feature = "middleware")]
pub mod middleware;
#[cfg(feature = "output")]
pub mod response;
// don't break existing imports
#[cfg(feature = "output")]
pub use response::*;
// be explicit about those values because bincode uses different defaults in different places
#[cfg(feature = "bincode")]
pub fn make_bincode_serializer() -> impl bincode::Options {
use bincode::Options;
bincode::DefaultOptions::new()
.with_little_endian()
.with_varint_encoding()
}