Feature names are currently hard-coded, but clearly should be configurable. Any library that wants to re-export buffa-generated types would want to control its feature names.
Come to think of it, gate_impls_on_crate_features should instead be named, e.g. .gate_json_impl_on_feature_name("serde")
/// Crate feature names the gated impls are conditioned on.
///
/// Fixed for v1; the consuming crate must define matching features in its
/// `Cargo.toml`. Customisable names can be added later as a separate config
/// field if a concrete need arises.
pub(crate) const JSON_FEATURE: &str = "json";
pub(crate) const VIEWS_FEATURE: &str = "views";
pub(crate) const TEXT_FEATURE: &str = "text";
pub(crate) const REFLECT_FEATURE: &str = "reflect";
Feature names are currently hard-coded, but clearly should be configurable. Any library that wants to re-export buffa-generated types would want to control its feature names.
Come to think of it,
gate_impls_on_crate_featuresshould instead be named, e.g..gate_json_impl_on_feature_name("serde")