pub struct LayerConfig {
pub name: String,
pub layer_type: LayerType,
pub weight: f32,
pub enabled: bool,
pub timeout: Duration,
}Expand description
Configuration for a single layer
Fields§
§name: StringLayer name
layer_type: LayerTypeLayer type identifier
weight: f32Weight for weighted aggregation (1.0 = normal)
enabled: boolWhether this layer is enabled
timeout: DurationTimeout for this layer
Implementations§
Source§impl LayerConfig
impl LayerConfig
Sourcepub fn perplexity() -> Self
pub fn perplexity() -> Self
Create a perplexity layer config
Sourcepub fn ml_classifier() -> Self
pub fn ml_classifier() -> Self
Create an ML classifier layer config
Sourcepub fn with_weight(self, weight: f32) -> Self
pub fn with_weight(self, weight: f32) -> Self
Set the layer weight
Sourcepub fn with_enabled(self, enabled: bool) -> Self
pub fn with_enabled(self, enabled: bool) -> Self
Set enabled state
Sourcepub fn with_timeout(self, timeout: Duration) -> Self
pub fn with_timeout(self, timeout: Duration) -> Self
Set timeout
Trait Implementations§
Source§impl Clone for LayerConfig
impl Clone for LayerConfig
Source§fn clone(&self) -> LayerConfig
fn clone(&self) -> LayerConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for LayerConfig
impl RefUnwindSafe for LayerConfig
impl Send for LayerConfig
impl Sync for LayerConfig
impl Unpin for LayerConfig
impl UnwindSafe for LayerConfig
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