pub struct Runtime { /* private fields */ }Expand description
Execution context available to nodes during execution.
Runtime provides nodes with information about the current execution state and allows them to interact with the execution environment.
§Example
use rust_langgraph::runtime::Runtime;
use rust_langgraph::Config;
let config = Config::new().with_thread_id("test-123");
let runtime = Runtime::new(config);
assert_eq!(runtime.step(), 0);Implementations§
Source§impl Runtime
impl Runtime
Sourcepub fn checkpoint_id(&self) -> Option<&str>
pub fn checkpoint_id(&self) -> Option<&str>
Get the current checkpoint ID
Sourcepub fn set_checkpoint_id(&mut self, id: impl Into<String>)
pub fn set_checkpoint_id(&mut self, id: impl Into<String>)
Set the checkpoint ID
Sourcepub fn increment_step(&mut self)
pub fn increment_step(&mut self)
Increment the step counter
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Runtime
impl RefUnwindSafe for Runtime
impl Send for Runtime
impl Sync for Runtime
impl Unpin for Runtime
impl UnsafeUnpin for Runtime
impl UnwindSafe for Runtime
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