pub enum BlockContent {
Text {
text: String,
role: Option<String>,
tokens: Option<u32>,
},
Tool {
tool_name: String,
input: Value,
output: Option<Value>,
duration_ms: Option<u64>,
success: bool,
},
File {
path: String,
operation: FileOperation,
content_hash: Option<BlockHash>,
lines: Option<u32>,
diff: Option<String>,
},
Decision {
decision: String,
reasoning: Option<String>,
evidence_blocks: Vec<BlockHash>,
confidence: Option<f32>,
},
Boundary {
boundary_type: BoundaryType,
context_tokens_before: u32,
context_tokens_after: u32,
summary: String,
continuation_hint: Option<String>,
},
Error {
error_type: String,
message: String,
resolution: Option<String>,
resolved: bool,
},
Checkpoint {
active_files: Vec<String>,
working_context: String,
pending_tasks: Vec<String>,
},
Binary {
data: Vec<u8>,
mime_type: String,
},
}Expand description
Block content variants
Variants§
Text
Text content (messages)
Tool
Tool invocation
File
File operation
Fields
§
operation: FileOperationDecision
Decision record
Fields
Boundary
Session boundary
Fields
§
boundary_type: BoundaryTypeError
Error record
Checkpoint
Checkpoint (periodic state snapshot)
Binary
Raw bytes (for binary content)
Trait Implementations§
Source§impl Clone for BlockContent
impl Clone for BlockContent
Source§fn clone(&self) -> BlockContent
fn clone(&self) -> BlockContent
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 moreSource§impl Debug for BlockContent
impl Debug for BlockContent
Source§impl<'de> Deserialize<'de> for BlockContent
impl<'de> Deserialize<'de> for BlockContent
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
Auto Trait Implementations§
impl Freeze for BlockContent
impl RefUnwindSafe for BlockContent
impl Send for BlockContent
impl Sync for BlockContent
impl Unpin for BlockContent
impl UnsafeUnpin for BlockContent
impl UnwindSafe for BlockContent
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