pub struct ColonyBuilder { /* private fields */ }Expand description
Builder for creating colonies with optional persistence.
Implementations§
Source§impl ColonyBuilder
impl ColonyBuilder
Sourcepub fn with_config(self, config: ColonyConfig) -> Self
pub fn with_config(self, config: ColonyConfig) -> Self
Set the colony configuration for simulation parameters.
This allows customizing decay rates, pruning thresholds, and semantic wiring settings.
Sourcepub fn with_persistence<P: AsRef<Path>>(self, _path: P) -> Self
pub fn with_persistence<P: AsRef<Path>>(self, _path: P) -> Self
Stub for when SQLite is not enabled.
Sourcepub fn auto_save(self, enabled: bool) -> Self
pub fn auto_save(self, enabled: bool) -> Self
Enable automatic saving on colony drop.
When enabled, the colony state will be persisted when the
PersistentColony is dropped.
Sourcepub fn cache_size(self, size: usize) -> Self
pub fn cache_size(self, size: usize) -> Self
Set the cache size for SQLite operations.
Sourcepub fn build_simple(self) -> Colony
pub fn build_simple(self) -> Colony
Build a standard Colony (no persistence).
Sourcepub fn build(self) -> Result<PersistentColony, BuilderError>
pub fn build(self) -> Result<PersistentColony, BuilderError>
Build without SQLite feature - returns error if persistence was requested.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ColonyBuilder
impl RefUnwindSafe for ColonyBuilder
impl Send for ColonyBuilder
impl Sync for ColonyBuilder
impl Unpin for ColonyBuilder
impl UnwindSafe for ColonyBuilder
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