pub struct Instructions { /* private fields */ }Expand description
A FoundationModels instructions value.
Implementations§
Source§impl Instructions
impl Instructions
Sourcepub fn push_structured(
&mut self,
source: impl Into<String>,
content: GeneratedContent,
)
pub fn push_structured( &mut self, source: impl Into<String>, content: GeneratedContent, )
Append a structured content segment.
Sourcepub fn into_segments(self) -> Vec<Segment>
pub fn into_segments(self) -> Vec<Segment>
Consume the instructions and return their segments.
Trait Implementations§
Source§impl Clone for Instructions
impl Clone for Instructions
Source§fn clone(&self) -> Instructions
fn clone(&self) -> Instructions
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 moreSource§impl Debug for Instructions
impl Debug for Instructions
Source§impl Default for Instructions
impl Default for Instructions
Source§fn default() -> Instructions
fn default() -> Instructions
Returns the “default value” for a type. Read more
Source§impl From<&str> for Instructions
impl From<&str> for Instructions
Source§impl From<GeneratedContent> for Instructions
impl From<GeneratedContent> for Instructions
Source§fn from(content: GeneratedContent) -> Self
fn from(content: GeneratedContent) -> Self
Converts to this type from the input type.
Source§impl From<String> for Instructions
impl From<String> for Instructions
Source§impl PartialEq for Instructions
impl PartialEq for Instructions
Source§fn eq(&self, other: &Instructions) -> bool
fn eq(&self, other: &Instructions) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for Instructions
Source§impl ToInstructions for &Instructions
impl ToInstructions for &Instructions
Source§fn to_instructions(self) -> Result<Instructions, FMError>
fn to_instructions(self) -> Result<Instructions, FMError>
Convert the value into instructions.
Source§impl ToInstructions for Instructions
impl ToInstructions for Instructions
Source§fn to_instructions(self) -> Result<Instructions, FMError>
fn to_instructions(self) -> Result<Instructions, FMError>
Convert the value into instructions.
Auto Trait Implementations§
impl Freeze for Instructions
impl RefUnwindSafe for Instructions
impl Send for Instructions
impl Sync for Instructions
impl Unpin for Instructions
impl UnsafeUnpin for Instructions
impl UnwindSafe for Instructions
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