pub enum Response {
Single(Item),
Multiline(Vec<Item>),
}Expand description
Parsed inference response for a single key.
Either a single item or a multiline block extracted from model output.
Variants§
Single(Item)
Single response item, e.g. from an inline KEY: value.
Multiline(Vec<Item>)
Multiline response with items sharing a common prefix/pattern.
Implementations§
Source§impl Response
impl Response
Sourcepub fn new(item: &Item, list: &[Item]) -> Self
pub fn new(item: &Item, list: &[Item]) -> Self
Create a Response from the collected items for a key.
Uses Response::Single when list has one item, Response::Multiline otherwise.
Trait Implementations§
impl StructuralPartialEq for Response
Auto Trait Implementations§
impl Freeze for Response
impl RefUnwindSafe for Response
impl Send for Response
impl Sync for Response
impl Unpin for Response
impl UnwindSafe for Response
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