pub struct PluginSelector { /* private fields */ }Expand description
Plugin selector with scoring logic
Implementations§
Source§impl PluginSelector
impl PluginSelector
Sourcepub fn new(weights: ScoringWeights) -> Self
pub fn new(weights: ScoringWeights) -> Self
Create a new plugin selector with custom weights
Sourcepub fn select(&self) -> Result<PluginMetadata>
pub fn select(&self) -> Result<PluginMetadata>
Select the best plugin based on scoring
Returns the plugin with the highest score. In case of ties, selects alphabetically by name.
§Errors
Returns an error if no plugins are available.
Sourcepub fn select_by_name(&self, name: &str) -> Result<PluginMetadata>
pub fn select_by_name(&self, name: &str) -> Result<PluginMetadata>
Select a plugin by name (manual override)
§Errors
Returns an error if the specified plugin is not found.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PluginSelector
impl RefUnwindSafe for PluginSelector
impl Send for PluginSelector
impl Sync for PluginSelector
impl Unpin for PluginSelector
impl UnsafeUnpin for PluginSelector
impl UnwindSafe for PluginSelector
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