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
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§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