pub struct TextBlock {
pub text: String,
}Expand description
Simple text content in a message.
The most common content type, representing plain text communication. Both users and assistants primarily use text blocks for their messages.
§Example
use open_agent::{TextBlock, ContentBlock};
let block = TextBlock::new("Hello, world!");
let content = ContentBlock::Text(block);Fields§
§text: StringThe text content.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for TextBlock
impl<'de> Deserialize<'de> for TextBlock
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 TextBlock
impl RefUnwindSafe for TextBlock
impl Send for TextBlock
impl Sync for TextBlock
impl Unpin for TextBlock
impl UnwindSafe for TextBlock
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