pub struct TextBlockParam {
pub text: String,
pub kind: String,
pub cache_control: Option<CacheControl>,
}Expand description
Text block parameter for system prompts
Fields§
§text: StringThe text content
kind: StringType field for serialization (always “text”)
cache_control: Option<CacheControl>Optional cache control for prompt caching
Implementations§
Source§impl TextBlockParam
impl TextBlockParam
Sourcepub fn with_cache_control(
text: impl Into<String>,
cache_control: CacheControl,
) -> Self
pub fn with_cache_control( text: impl Into<String>, cache_control: CacheControl, ) -> Self
Creates a new text block with cache control
Trait Implementations§
Source§impl Clone for TextBlockParam
impl Clone for TextBlockParam
Source§fn clone(&self) -> TextBlockParam
fn clone(&self) -> TextBlockParam
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 TextBlockParam
impl Debug for TextBlockParam
Source§impl<'de> Deserialize<'de> for TextBlockParam
impl<'de> Deserialize<'de> for TextBlockParam
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 TextBlockParam
impl PartialEq for TextBlockParam
Source§impl Serialize for TextBlockParam
impl Serialize for TextBlockParam
impl Eq for TextBlockParam
impl StructuralPartialEq for TextBlockParam
Auto Trait Implementations§
impl Freeze for TextBlockParam
impl RefUnwindSafe for TextBlockParam
impl Send for TextBlockParam
impl Sync for TextBlockParam
impl Unpin for TextBlockParam
impl UnwindSafe for TextBlockParam
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