pub struct StreamingBamlValue {
pub value: BamlValue,
pub completion_state: CompletionState,
}Expand description
A BamlValue with completion state tracking
Fields§
§value: BamlValue§completion_state: CompletionStateImplementations§
Source§impl StreamingBamlValue
impl StreamingBamlValue
Sourcepub fn new(value: BamlValue, state: CompletionState) -> Self
pub fn new(value: BamlValue, state: CompletionState) -> Self
Create a new streaming value with initial state
Sourcepub fn from_ir_skeleton(ir: &IR, field_type: &FieldType) -> Self
pub fn from_ir_skeleton(ir: &IR, field_type: &FieldType) -> Self
Create a skeleton value from IR with all fields marked as Pending
Sourcepub fn update_from_partial(
&mut self,
ir: &IR,
partial_value: BamlValue,
field_type: &FieldType,
)
pub fn update_from_partial( &mut self, ir: &IR, partial_value: BamlValue, field_type: &FieldType, )
Update this value with new partial data
Sourcepub fn mark_complete(&mut self)
pub fn mark_complete(&mut self)
Mark this value as complete
Trait Implementations§
Source§impl Clone for StreamingBamlValue
impl Clone for StreamingBamlValue
Source§fn clone(&self) -> StreamingBamlValue
fn clone(&self) -> StreamingBamlValue
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 StreamingBamlValue
impl Debug for StreamingBamlValue
Source§impl Serialize for StreamingBamlValue
impl Serialize for StreamingBamlValue
Source§impl StreamingCapable for StreamingBamlValue
impl StreamingCapable for StreamingBamlValue
Source§fn create_skeleton(ir: &IR, field_type: &FieldType) -> StreamingBamlValue
fn create_skeleton(ir: &IR, field_type: &FieldType) -> StreamingBamlValue
Create a skeleton value from IR
Auto Trait Implementations§
impl Freeze for StreamingBamlValue
impl RefUnwindSafe for StreamingBamlValue
impl Send for StreamingBamlValue
impl Sync for StreamingBamlValue
impl Unpin for StreamingBamlValue
impl UnwindSafe for StreamingBamlValue
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