pub struct PatternLibrary { /* private fields */ }Expand description
Pattern library
Implementations§
Source§impl PatternLibrary
impl PatternLibrary
pub fn new() -> Self
pub fn initialize(&mut self) -> Result<(), StatisticalError>
Sourcepub fn add_pattern(&mut self, pattern: StatisticalPattern)
pub fn add_pattern(&mut self, pattern: StatisticalPattern)
Add (or replace) a named statistical pattern.
Sourcepub fn get_pattern(&self, pattern_id: &str) -> Option<&StatisticalPattern>
pub fn get_pattern(&self, pattern_id: &str) -> Option<&StatisticalPattern>
Look up a statistical pattern by id.
Sourcepub fn remove_pattern(&mut self, pattern_id: &str) -> Option<StatisticalPattern>
pub fn remove_pattern(&mut self, pattern_id: &str) -> Option<StatisticalPattern>
Remove a statistical pattern by id.
Sourcepub fn list_pattern_ids(&self) -> Vec<String>
pub fn list_pattern_ids(&self) -> Vec<String>
List the ids of all stored patterns.
Sourcepub fn pattern_count(&self) -> usize
pub fn pattern_count(&self) -> usize
Returns the number of stored patterns.
Sourcepub fn add_pattern_template(&mut self, template: PatternTemplate)
pub fn add_pattern_template(&mut self, template: PatternTemplate)
Register a pattern template.
Sourcepub fn pattern_templates(&self) -> &[PatternTemplate]
pub fn pattern_templates(&self) -> &[PatternTemplate]
Returns the list of registered pattern templates.
Sourcepub fn get_pattern_template(
&self,
template_id: &str,
) -> Option<&PatternTemplate>
pub fn get_pattern_template( &self, template_id: &str, ) -> Option<&PatternTemplate>
Look up a pattern template by id.
Sourcepub fn pattern_template_count(&self) -> usize
pub fn pattern_template_count(&self) -> usize
Returns the number of registered pattern templates.
Auto Trait Implementations§
impl Freeze for PatternLibrary
impl RefUnwindSafe for PatternLibrary
impl Send for PatternLibrary
impl Sync for PatternLibrary
impl Unpin for PatternLibrary
impl UnsafeUnpin for PatternLibrary
impl UnwindSafe for PatternLibrary
Blanket Implementations§
§impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
Aggregate shares in an MPC protocol.
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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