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 Freeze for Preset
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more