pub struct PluginStore { /* private fields */ }Expand description
Dynamic plugin store.
This structure scans various directories upon its construction and contains a list of various plugins that could be loaded.
Implementations§
Source§impl PluginStore
 
impl PluginStore
Sourcepub fn scan_dir(&mut self, dir: PathBuf) -> Result<&mut Self>
 
pub fn scan_dir(&mut self, dir: PathBuf) -> Result<&mut Self>
Scan a directory and collect all plugins inside of it.
Sourcepub fn load(&mut self, path: PathBuf) -> &mut Self
 
pub fn load(&mut self, path: PathBuf) -> &mut Self
Adds a single library to the store
§Safety
Same as previous functions - compiler can not guarantee the safety of third party library implementations.
Sourcepub fn available_decoders(&self) -> Vec<String>
 
pub fn available_decoders(&self) -> Vec<String>
Returns the names of all currently available decoders that can be used.
Sourcepub fn available_estimators(&self) -> Vec<String>
 
pub fn available_estimators(&self) -> Vec<String>
Returns the names of all currently available estimators that can be used.
Sourcepub fn available_detectors(&self) -> Vec<String>
 
pub fn available_detectors(&self) -> Vec<String>
Returns the names of all currently available detectors that can be used.
Sourcepub fn create_decoder(&self, name: &str, args: String) -> Result<DecoderPlugin>
 
pub fn create_decoder(&self, name: &str, args: String) -> Result<DecoderPlugin>
Create a new instance of a decoder.
Sourcepub fn create_estimator(
    &self,
    name: &str,
    args: String,
) -> Result<EstimatorPlugin>
 
pub fn create_estimator( &self, name: &str, args: String, ) -> Result<EstimatorPlugin>
Create a new instance of motion estimator.
Sourcepub fn create_detector(
    &self,
    name: &str,
    args: String,
) -> Result<DetectorPlugin>
 
pub fn create_detector( &self, name: &str, args: String, ) -> Result<DetectorPlugin>
Create a new instance of motion detector.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PluginStore
impl RefUnwindSafe for PluginStore
impl Send for PluginStore
impl Sync for PluginStore
impl Unpin for PluginStore
impl UnwindSafe for PluginStore
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<SS, SP> SupersetOf<SS> for SPwhere
    SS: SubsetOf<SP>,
 
impl<SS, SP> SupersetOf<SS> for SPwhere
    SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
 
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct 
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
 
fn is_in_subset(&self) -> bool
Checks if 
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
 
fn to_subset_unchecked(&self) -> SS
Use with care! Same as 
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
 
fn from_subset(element: &SS) -> SP
The inclusion map: converts 
self to the equivalent element of its superset.