Skip to main content

enabled_for

Function enabled_for 

Source
pub fn enabled_for(
    target: Target,
    resource: &str,
    export: Option<&ExportConfig>,
) -> bool
Expand description

Returns true when resource should be emitted for target.

A resource is included by default. It is excluded only when the manifest export: section contains an explicit enabled: false override for the given resource and target combination.

use lightshuttle_export::{Target, resolve::enabled_for};

// Without any export config, every resource is enabled.
assert!(enabled_for(Target::Compose, "db", None));