Struct llm_api_adapter::models::ContentBlock
source · pub struct ContentBlock {
pub text: String,
pub block_type: String,
}
Expand description
Represents a block of content in the API response.
A ContentBlock
struct contains the text content and the type of the block.
Fields§
§text: String
The text content of the block.
block_type: String
The type of the content block.
The #[serde(rename = "type")]
attribute is used to map the type
field
in the JSON response to the block_type
field in the struct.
Trait Implementations§
source§impl Clone for ContentBlock
impl Clone for ContentBlock
source§fn clone(&self) -> ContentBlock
fn clone(&self) -> ContentBlock
Returns a copy 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 ContentBlock
impl Debug for ContentBlock
source§impl<'de> Deserialize<'de> for ContentBlock
impl<'de> Deserialize<'de> for ContentBlock
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 ContentBlock
impl RefUnwindSafe for ContentBlock
impl Send for ContentBlock
impl Sync for ContentBlock
impl Unpin for ContentBlock
impl UnwindSafe for ContentBlock
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