pub struct StandardStreamEvent {
pub base: BaseStreamEvent,
pub data: EventData,
pub name: String,
}Expand description
A standard stream event that follows LangChain convention for event data.
Fields§
§base: BaseStreamEventThe base event fields.
data: EventDataEvent data.
The contents of the event data depend on the event type.
name: StringThe name of the Runnable that generated the event.
Implementations§
Source§impl StandardStreamEvent
impl StandardStreamEvent
Sourcepub fn new(
event: impl Into<String>,
run_id: impl Into<String>,
name: impl Into<String>,
) -> Self
pub fn new( event: impl Into<String>, run_id: impl Into<String>, name: impl Into<String>, ) -> Self
Create a new StandardStreamEvent.
Set the tags for this event.
Sourcepub fn with_metadata(self, metadata: HashMap<String, Value>) -> Self
pub fn with_metadata(self, metadata: HashMap<String, Value>) -> Self
Set the metadata for this event.
Sourcepub fn with_parent_ids(self, parent_ids: Vec<String>) -> Self
pub fn with_parent_ids(self, parent_ids: Vec<String>) -> Self
Set the parent IDs for this event.
Trait Implementations§
Source§impl Clone for StandardStreamEvent
impl Clone for StandardStreamEvent
Source§fn clone(&self) -> StandardStreamEvent
fn clone(&self) -> StandardStreamEvent
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 StandardStreamEvent
impl Debug for StandardStreamEvent
Source§impl<'de> Deserialize<'de> for StandardStreamEvent
impl<'de> Deserialize<'de> for StandardStreamEvent
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<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 StandardStreamEvent
impl RefUnwindSafe for StandardStreamEvent
impl Send for StandardStreamEvent
impl Sync for StandardStreamEvent
impl Unpin for StandardStreamEvent
impl UnwindSafe for StandardStreamEvent
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