pub struct PmStorage { /* private fields */ }Implementations§
Source§impl PmStorage
impl PmStorage
pub async fn new(config: PmStorageConfig) -> Result<Self, String>
Sourcepub async fn save_ticket_map(
&self,
graph_id: &str,
map: &HashMap<String, String>,
) -> Result<(), String>
pub async fn save_ticket_map( &self, graph_id: &str, map: &HashMap<String, String>, ) -> Result<(), String>
Insert or replace all ticket→node mappings for a graph.
Sourcepub async fn get_ticket_map(
&self,
graph_id: &str,
) -> Result<HashMap<String, String>, String>
pub async fn get_ticket_map( &self, graph_id: &str, ) -> Result<HashMap<String, String>, String>
Fetch the ticket_id→node_id map for a graph.
Sourcepub async fn list_ticket_maps(
&self,
limit: usize,
) -> Result<Vec<(String, i64)>, String>
pub async fn list_ticket_maps( &self, limit: usize, ) -> Result<Vec<(String, i64)>, String>
List all known graph IDs ordered by first insertion time descending.
Returns Vec<(graph_id, created_at)>.
Sourcepub async fn save_ticket_source(
&self,
graph_id: &str,
source: &str,
) -> Result<(), String>
pub async fn save_ticket_source( &self, graph_id: &str, source: &str, ) -> Result<(), String>
Save the raw ticket source for a graph.
Sourcepub async fn get_ticket_source(
&self,
graph_id: &str,
) -> Result<Option<String>, String>
pub async fn get_ticket_source( &self, graph_id: &str, ) -> Result<Option<String>, String>
Fetch the raw ticket source for a graph.
Sourcepub async fn get_ticket_for_node(
&self,
graph_id: &str,
node_id: &str,
) -> Result<Option<String>, String>
pub async fn get_ticket_for_node( &self, graph_id: &str, node_id: &str, ) -> Result<Option<String>, String>
Reverse lookup: node_id → ticket_id.
Sourcepub async fn append_node_log(
&self,
graph_id: &str,
node_id: &str,
ticket_id: Option<&str>,
seq: i64,
event_type: &str,
event_data: &str,
) -> Result<(), String>
pub async fn append_node_log( &self, graph_id: &str, node_id: &str, ticket_id: Option<&str>, seq: i64, event_type: &str, event_data: &str, ) -> Result<(), String>
Append a single log entry for a node execution event.
event_type is one of: “prompt”, “start”, “tool_use”, “tool_result”,
“complete”, “error”, “passthrough”, “outcome”.
event_data is a JSON string.
Auto Trait Implementations§
impl Freeze for PmStorage
impl !RefUnwindSafe for PmStorage
impl Send for PmStorage
impl Sync for PmStorage
impl Unpin for PmStorage
impl UnsafeUnpin for PmStorage
impl !UnwindSafe for PmStorage
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more