pub struct BehaviorRegistry { /* private fields */ }Expand description
Versioned, append-only registry of behaviour patterns. Cheap to clone
(Arc-wrapped). register keeps the highest-version pattern per id.
Implementations§
Source§impl BehaviorRegistry
impl BehaviorRegistry
pub fn new() -> Self
pub fn register(&self, pattern: BehaviorPattern)
pub fn extend<I: IntoIterator<Item = BehaviorPattern>>(&self, patterns: I)
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn snapshot(&self) -> Vec<BehaviorPattern>
Trait Implementations§
Source§impl Clone for BehaviorRegistry
impl Clone for BehaviorRegistry
Source§fn clone(&self) -> BehaviorRegistry
fn clone(&self) -> BehaviorRegistry
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Default for BehaviorRegistry
impl Default for BehaviorRegistry
Source§fn default() -> BehaviorRegistry
fn default() -> BehaviorRegistry
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for BehaviorRegistry
impl !RefUnwindSafe for BehaviorRegistry
impl Send for BehaviorRegistry
impl Sync for BehaviorRegistry
impl Unpin for BehaviorRegistry
impl UnsafeUnpin for BehaviorRegistry
impl !UnwindSafe for BehaviorRegistry
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