pub struct StreamableParser { /* private fields */ }Implementations§
Source§impl StreamableParser
impl StreamableParser
pub fn new(encoding: HarmonyEncoding, role: Option<Role>) -> Result<Self>
pub fn process(&mut self, token: u32) -> Result<&mut Self>
pub fn process_eos(&mut self) -> Result<&mut Self>
pub fn current_content(&self) -> Result<String>
pub fn current_role(&self) -> Option<Role>
pub fn current_content_type(&self) -> Option<String>
pub fn last_content_delta(&self) -> Result<Option<String>>
pub fn into_messages(self) -> Vec<Message>
pub fn messages(&self) -> &[Message]
pub fn tokens(&self) -> &[u32]
pub fn current_recipient(&self) -> Option<String>
pub fn current_channel(&self) -> Option<String>
Auto Trait Implementations§
impl Freeze for StreamableParser
impl RefUnwindSafe for StreamableParser
impl Send for StreamableParser
impl Sync for StreamableParser
impl Unpin for StreamableParser
impl UnwindSafe for StreamableParser
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