pub struct PromptBlockDef {
pub name: String,
pub order: u32,
pub max_length: usize,
}Expand description
A block definition within a SystemPromptStrategy (structure template).
Defines a named slot in the system prompt with an ordering and token budget.
The actual content is provided by a SystemPrompt instance.
Fields§
§name: StringBlock name (e.g., “identity”, “instructions”, “tools”, “constraints”).
order: u32Assembly order — lower numbers appear first in the final prompt.
max_length: usizeMaximum character budget for this block. Content exceeding this is truncated.
Trait Implementations§
Source§impl Clone for PromptBlockDef
impl Clone for PromptBlockDef
Source§fn clone(&self) -> PromptBlockDef
fn clone(&self) -> PromptBlockDef
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 PromptBlockDef
impl Debug for PromptBlockDef
Source§impl<'de> Deserialize<'de> for PromptBlockDef
impl<'de> Deserialize<'de> for PromptBlockDef
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for PromptBlockDef
impl PartialEq for PromptBlockDef
Source§fn eq(&self, other: &PromptBlockDef) -> bool
fn eq(&self, other: &PromptBlockDef) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for PromptBlockDef
impl Serialize for PromptBlockDef
impl StructuralPartialEq for PromptBlockDef
Auto Trait Implementations§
impl Freeze for PromptBlockDef
impl RefUnwindSafe for PromptBlockDef
impl Send for PromptBlockDef
impl Sync for PromptBlockDef
impl Unpin for PromptBlockDef
impl UnsafeUnpin for PromptBlockDef
impl UnwindSafe for PromptBlockDef
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