pub enum StreamEvent {
Standard(StandardStreamEvent),
Custom(CustomStreamEvent),
}Expand description
Union type for stream events.
A stream event can be either a standard event following LangChain conventions, or a custom event created by the user.
Variants§
Standard(StandardStreamEvent)
A standard stream event.
Custom(CustomStreamEvent)
A custom stream event.
Implementations§
Source§impl StreamEvent
impl StreamEvent
Get the tags.
Sourcepub fn parent_ids(&self) -> &[String]
pub fn parent_ids(&self) -> &[String]
Get the parent IDs.
Sourcepub fn is_standard(&self) -> bool
pub fn is_standard(&self) -> bool
Check if this is a standard event.
Trait Implementations§
Source§impl Clone for StreamEvent
impl Clone for StreamEvent
Source§fn clone(&self) -> StreamEvent
fn clone(&self) -> StreamEvent
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 StreamEvent
impl Debug for StreamEvent
Source§impl<'de> Deserialize<'de> for StreamEvent
impl<'de> Deserialize<'de> for StreamEvent
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<CustomStreamEvent> for StreamEvent
impl From<CustomStreamEvent> for StreamEvent
Source§fn from(event: CustomStreamEvent) -> Self
fn from(event: CustomStreamEvent) -> Self
Converts to this type from the input type.
Source§impl From<StandardStreamEvent> for StreamEvent
impl From<StandardStreamEvent> for StreamEvent
Source§fn from(event: StandardStreamEvent) -> Self
fn from(event: StandardStreamEvent) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for StreamEvent
impl RefUnwindSafe for StreamEvent
impl Send for StreamEvent
impl Sync for StreamEvent
impl Unpin for StreamEvent
impl UnwindSafe for StreamEvent
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