#[non_exhaustive]pub struct SystemBlock {
pub text: String,
pub cache_control: Option<CacheControl>,
}Expand description
One entry inside a SystemPrompt::Blocks sequence.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.text: StringText content of this block.
cache_control: Option<CacheControl>Optional cache breakpoint for this block.
Implementations§
Source§impl SystemBlock
impl SystemBlock
Sourcepub fn new(text: impl Into<String>) -> Self
pub fn new(text: impl Into<String>) -> Self
Build a block with the given text and no cache breakpoint.
Sourcepub fn with_cache_control(self, cache_control: CacheControl) -> Self
pub fn with_cache_control(self, cache_control: CacheControl) -> Self
Builder-style helper: attach a cache breakpoint to this block.
Trait Implementations§
Source§impl Clone for SystemBlock
impl Clone for SystemBlock
Source§fn clone(&self) -> SystemBlock
fn clone(&self) -> SystemBlock
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 moreAuto Trait Implementations§
impl Freeze for SystemBlock
impl RefUnwindSafe for SystemBlock
impl Send for SystemBlock
impl Sync for SystemBlock
impl Unpin for SystemBlock
impl UnsafeUnpin for SystemBlock
impl UnwindSafe for SystemBlock
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