Struct bulwark_config::Preset
source · pub struct Preset {
pub reference: String,
pub plugins: Vec<Reference>,
}
Expand description
A mapping between a reference identifier and a list of plugins that form a preset plugin group.
Fields§
§reference: String
The preset reference key. Should be limited to ASCII lowercase a-z plus underscores. Maximum 96 characters.
plugins: Vec<Reference>
The list of references to plugins and other presets contained within this preset.
Implementations§
source§impl Preset
impl Preset
sourcepub fn resolve_plugins<'a>(
&'a self,
config: &'a Config
) -> Result<Vec<&Plugin>, ResolutionError>
pub fn resolve_plugins<'a>( &'a self, config: &'a Config ) -> Result<Vec<&Plugin>, ResolutionError>
Resolves all references within a Preset
, producing a flattened list of the corresponding Plugin
s.
Arguments
config
- AConfig
reference to perform lookups againsts.Preset
s do not maintain their own references to their parentConfig
so this must be passed in.
See Config::plugin
and Config::preset
.
Trait Implementations§
source§impl<'v_a> ValidateArgs<'v_a> for Preset
impl<'v_a> ValidateArgs<'v_a> for Preset
type Args = ()
fn validate_args(&self, args: Self::Args) -> Result<(), ValidationErrors>
Auto Trait Implementations§
impl RefUnwindSafe for Preset
impl Send for Preset
impl Sync for Preset
impl Unpin for Preset
impl UnwindSafe for Preset
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more