pub struct BehaviorRules {
pub system_prompt: String,
pub schemas: HashMap<String, Value>,
pub consistency_rules: Vec<ConsistencyRule>,
pub state_transitions: HashMap<String, StateMachine>,
pub max_context_interactions: usize,
pub enable_semantic_search: bool,
}Expand description
Behavior rules that define how the mock API should behave
Fields§
§system_prompt: StringSystem prompt that describes the overall API behavior
schemas: HashMap<String, Value>Resource schemas (e.g., User, Product, Order). Maps resource name to JSON Schema.
consistency_rules: Vec<ConsistencyRule>Consistency rules to enforce logical behavior
state_transitions: HashMap<String, StateMachine>State machines for resource lifecycle management
max_context_interactions: usizeMaximum number of interactions to include in context
enable_semantic_search: boolEnable semantic search for relevant past interactions
Trait Implementations§
Source§impl Clone for BehaviorRules
impl Clone for BehaviorRules
Source§fn clone(&self) -> BehaviorRules
fn clone(&self) -> BehaviorRules
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 Debug for BehaviorRules
impl Debug for BehaviorRules
Source§impl Default for BehaviorRules
impl Default for BehaviorRules
Source§fn default() -> BehaviorRules
fn default() -> BehaviorRules
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for BehaviorRules
impl<'de> Deserialize<'de> for BehaviorRules
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<BehaviorRules, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<BehaviorRules, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for BehaviorRules
impl Serialize for BehaviorRules
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for BehaviorRules
impl RefUnwindSafe for BehaviorRules
impl Send for BehaviorRules
impl Sync for BehaviorRules
impl Unpin for BehaviorRules
impl UnsafeUnpin for BehaviorRules
impl UnwindSafe for BehaviorRules
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