Skip to content

Customizable feature names for gate_impls_on_crate_features #169

@nyurik

Description

@nyurik

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";

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions