pub struct SessionScoreRegistry { /* private fields */ }Expand description
Runtime registry for session score plugins.
Implementations§
Source§impl SessionScoreRegistry
impl SessionScoreRegistry
pub fn new(default_plugin: &str) -> Self
pub fn register<P>(&mut self, plugin: P)where
P: SessionScorePlugin + 'static,
pub fn available_plugins(&self) -> Vec<String>
pub fn score_default( &self, session: &Session, ) -> Result<SessionScore, SessionScoreError>
pub fn score_with( &self, plugin_id: &str, session: &Session, ) -> Result<SessionScore, SessionScoreError>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SessionScoreRegistry
impl !RefUnwindSafe for SessionScoreRegistry
impl Send for SessionScoreRegistry
impl Sync for SessionScoreRegistry
impl Unpin for SessionScoreRegistry
impl UnsafeUnpin for SessionScoreRegistry
impl !UnwindSafe for SessionScoreRegistry
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