Skip to main content

SurrealDbProvider

Struct SurrealDbProvider 

Source
pub struct SurrealDbProvider { /* private fields */ }

Implementations§

Source§

impl SurrealDbProvider

Source

pub async fn new( connection_string: &str, surreal_user: Option<&str>, surreal_pass: Option<&str>, surreal_ns: Option<&str>, surreal_db: Option<&str>, ) -> Result<Self>

Connect to SurrealDB.

For server endpoints (ws://, wss://, http://, https://) the caller may supply optional root credentials. When credentials are absent the defaults root / root are used, which matches a freshly-started SurrealDB server. For embedded endpoints (SurrealKV, in-memory) authentication is not performed.

Source

pub fn client(&self) -> Surreal<Any>

Trait Implementations§

Source§

impl Debug for SurrealDbProvider

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PersistenceLayer for SurrealDbProvider

Source§

fn create_presentation<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, owner_id: &'life1 str, draft: &'life2 PresentationDraft, ) -> Pin<Box<dyn Future<Output = Result<Presentation>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Create a validated template in the verified owner’s partition.
Source§

fn get_presentation<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, owner_id: &'life1 str, id: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<Option<Presentation>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Read one template without exposing records belonging to another owner.
Source§

fn list_presentations<'life0, 'life1, 'async_trait>( &'life0 self, owner_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Vec<Presentation>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

List the owner’s templates, including disabled records for management.
Source§

fn update_presentation<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, owner_id: &'life1 str, id: &'life2 str, expected_revision: u64, draft: &'life3 PresentationDraft, ) -> Pin<Box<dyn Future<Output = Result<Presentation>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Atomically replace editable content only at the expected revision.
Source§

fn delete_presentation<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, owner_id: &'life1 str, id: &'life2 str, expected_revision: u64, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Atomically delete only the requested owner’s expected record revision.
Source§

fn create_agent_root<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, owner_id: &'life1 str, thread: &'life2 AgentThread, ) -> Pin<Box<dyn Future<Output = Result<PersistedAgentThread>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Insert a fresh root. Existing IDs/paths are errors, never upserts. The owner argument must come from the verified host context.
Source§

fn create_agent_child<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, owner_id: &'life1 str, thread: &'life2 AgentThread, edge: &'life3 AgentEdge, ) -> Pin<Box<dyn Future<Output = Result<PersistedAgentThread>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Atomically insert a pending child and its immutable edge. Both persisted parent and root must belong to the owner/tree and still have a live turn. An interrupted/error response is not proof that nothing committed: the caller must reconcile the exact child ID before releasing its reservation.
Source§

fn load_agent_thread<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, owner_id: &'life1 str, thread_id: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<Option<PersistedAgentThread>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Load only from this owner’s namespace. Missing records return None; corrupt records or backend failures return errors, never empty success.
Source§

fn update_agent_thread<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, owner_id: &'life1 str, expected_revision: u64, thread: &'life2 AgentThread, ) -> Pin<Box<dyn Future<Output = Result<PersistedAgentThread>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Update mutable turn state with compare-and-swap on the storage revision. Lineage, artifact, creation time, and terminal outcomes cannot be rewritten. A new authorized turn may replace a terminal outcome with a new run ID.
Source§

fn list_agent_threads<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, owner_id: &'life1 str, root_run_id: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<Vec<PersistedAgentThread>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

List one owner’s root-run tree, ordered by canonical path then thread ID using Rust string ordering (independent of database locale/collation).
Source§

fn list_agent_edges<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, owner_id: &'life1 str, root_run_id: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<Vec<AgentEdge>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

List immutable edges in canonical path/child-ID order. No deletion API is exposed: lineage remains available for recovery and lifetime accounting.
Source§

fn save_canonical_tool_receipt<'life0, 'life1, 'async_trait>( &'life0 self, receipt: &'life1 CanonicalToolReceipt, ) -> Pin<Box<dyn Future<Output = Result<CanonicalToolReceipt>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Append one immutable pre-format tool result. A repeated call ID is idempotent only when its canonical payload identity is unchanged.
Source§

fn list_canonical_tool_receipts<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, owner_id: &'life1 str, run_id: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<Vec<CanonicalToolReceipt>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

List one owner’s canonical receipts for a run in stable execution order.
Source§

fn save_session<'life0, 'life1, 'async_trait>( &'life0 self, session: &'life1 Session, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn load_session<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, owner_id: &'life1 str, id: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<Option<Session>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn save_conversation_policy<'life0, 'life1, 'async_trait>( &'life0 self, record: &'life1 ConversationPolicyRecord, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Save or replace a conversation-scoped chat policy.
Source§

fn load_conversation_policy<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, owner_id: &'life1 str, conversation_id: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<Option<ConversationPolicyRecord>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Load a conversation-scoped chat policy.
Source§

fn delete_conversation_policy<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, owner_id: &'life1 str, conversation_id: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Delete a conversation-scoped chat policy.
Source§

fn save_principal_conversation_policy<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, record: &'life1 ConversationPolicyRecord, expected: Option<&'life2 RunPolicy>, ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Conditionally write in the principal namespace. None expects no record; an existing policy must still equal the complete supplied baseline.
Source§

fn load_principal_conversation_policy<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, owner_id: &'life1 str, conversation_id: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<Option<ConversationPolicyRecord>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Read only the verified principal namespace, without legacy fallback.
Source§

fn save_user_prompt_caching_settings<'life0, 'life1, 'async_trait>( &'life0 self, settings: &'life1 UserPromptCachingSettings, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Save or replace one verified user’s prompt-caching preferences.
Source§

fn load_user_prompt_caching_settings<'life0, 'life1, 'async_trait>( &'life0 self, principal_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Option<UserPromptCachingSettings>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Load prompt-caching preferences by the collision-safe verified principal key.
Source§

fn save_skill<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, skill: &'life1 Skill, embedding: &'life2 [f32], ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn search_skills<'life0, 'life1, 'async_trait>( &'life0 self, query_vec: &'life1 [f32], limit: usize, ) -> Pin<Box<dyn Future<Output = Result<Vec<SkillMatch>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn list_skills<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Vec<Skill>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

List all persisted skills.
Source§

fn delete_skill<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Delete a skill by ID.
Source§

fn save_knowledge_base<'life0, 'life1, 'async_trait>( &'life0 self, kb: &'life1 KnowledgeBase, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Save or update a knowledge base definition.
Source§

fn save_chunk<'life0, 'life1, 'async_trait>( &'life0 self, chunk: &'life1 KnowledgeChunk, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Save a knowledge chunk.
Source§

fn search_knowledge<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, owner_id: &'life1 str, query_vec: &'life2 [f32], limit: usize, min_score: f32, ) -> Pin<Box<dyn Future<Output = Result<Vec<KnowledgeMatch>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Search knowledge across ALL knowledge bases (original behavior).
Source§

fn save_agent<'life0, 'life1, 'async_trait>( &'life0 self, agent: &'life1 AgentArtifact, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn load_agent<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Option<AgentArtifact>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn save_agent_if_unchanged<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, expected: &'life1 AgentArtifact, updated: &'life2 AgentArtifact, ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Persist a merged agent only while the stored artifact matches the read baseline. A conflict returns false without overwriting another editor.
Source§

fn load_agent_by_name<'life0, 'life1, 'async_trait>( &'life0 self, name: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Option<AgentArtifact>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn list_agents<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Vec<AgentArtifact>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn delete_agent<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Delete an agent by ID.
Source§

fn save_memory<'life0, 'life1, 'async_trait>( &'life0 self, memory: &'life1 Memory, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn search_memory<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, agent_id: Option<&'life1 str>, query_vec: &'life2 [f32], limit: usize, min_score: f32, ) -> Pin<Box<dyn Future<Output = Result<Vec<MemoryMatch>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn get_knowledge_base<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, owner_id: &'life1 str, id: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<Option<KnowledgeBase>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Get a knowledge base by ID.
Source§

fn get_knowledge_base_by_name<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, owner_id: &'life1 str, name: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<Option<KnowledgeBase>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Get a knowledge base by name.
Source§

fn list_knowledge_bases<'life0, 'life1, 'async_trait>( &'life0 self, owner_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Vec<KnowledgeBase>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

List all knowledge bases.
Source§

fn delete_knowledge_base<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, owner_id: &'life1 str, id: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Delete a knowledge base and all its chunks/documents.
Source§

fn search_knowledge_scoped<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>( &'life0 self, owner_id: &'life1 str, kb_ids: &'life2 [&'life3 str], query_vec: &'life4 [f32], limit: usize, min_score: f32, ) -> Pin<Box<dyn Future<Output = Result<Vec<KnowledgeMatch>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait,

Search knowledge scoped to specific knowledge base IDs.
Source§

fn save_document<'life0, 'life1, 'async_trait>( &'life0 self, doc: &'life1 KnowledgeDocument, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Save a document record.
Source§

fn get_document<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, owner_id: &'life1 str, id: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<Option<KnowledgeDocument>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Get a document by ID.
Source§

fn list_documents<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, owner_id: &'life1 str, kb_id: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<Vec<KnowledgeDocument>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

List documents in a knowledge base.
Source§

fn count_documents<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, owner_id: &'life1 str, kb_id: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<usize>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Count documents in a knowledge base. Default impl uses list_documents; providers should override with a backend-native COUNT query for efficiency.
Source§

fn update_document_status<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, owner_id: &'life1 str, doc_id: &'life2 str, status: &'life3 DocumentStatus, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Update document processing status.
Source§

fn delete_document<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, owner_id: &'life1 str, doc_id: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Delete a document and all its associated chunks.
Source§

fn upsert_settings_type<'life0, 'life1, 'async_trait>( &'life0 self, st: &'life1 SettingsType, ) -> Pin<Box<dyn Future<Output = Result<Uuid>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Upsert a settings type definition (core UAR namespace or plugin-provided). Callers pass in the full struct including JSON Schema — idempotent on key. Returns the actual id stored in the database: on a first insert this matches st.id, but on a conflict-update the original row’s id is kept, so callers must use the returned value when constructing FK references.
Source§

fn list_settings_types<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Vec<SettingsType>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

List all registered settings types.
Source§

fn get_settings_type<'life0, 'life1, 'async_trait>( &'life0 self, key: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Option<SettingsType>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Get a settings type by key slug (e.g. “server”).
Source§

fn upsert_setting<'life0, 'life1, 'async_trait>( &'life0 self, setting: &'life1 Settings, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Upsert a single setting value. Read more
Source§

fn get_setting<'life0, 'life1, 'async_trait>( &'life0 self, key: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Option<Settings>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Get one setting by its unique dotted key (e.g. “server.port”).
Source§

fn compare_and_swap_global_presentation_policy<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, expected: &'life1 Value, selection: &'life2 ResourceSelection, ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Change only global Presentation intent if the full saved policy still matches the supplied baseline. Missing or changed records return false.
Source§

fn list_settings<'life0, 'life1, 'async_trait>( &'life0 self, type_key: Option<&'life1 str>, parent_id: Option<Uuid>, ) -> Pin<Box<dyn Future<Output = Result<Vec<Settings>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

List settings, optionally scoped to a type key and/or parent_id.
Source§

fn delete_setting<'life0, 'life1, 'async_trait>( &'life0 self, key: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Delete a setting by key (reset-to-default workflow).
Source§

fn insert_attachment<'life0, 'life1, 'async_trait>( &'life0 self, meta: &'life1 AttachmentMeta, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Persist attachment metadata after a file has been written to disk.
Source§

fn get_attachment<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Option<AttachmentMeta>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Retrieve attachment metadata by ID.
Source§

fn list_attachments_for_session<'life0, 'life1, 'async_trait>( &'life0 self, session_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Vec<AttachmentMeta>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

List all attachments uploaded during a given chat session.
Source§

fn save_checkpoint<'life0, 'life1, 'async_trait>( &'life0 self, checkpoint: &'life1 Checkpoint, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Persist a graph execution checkpoint.
Source§

fn load_checkpoint<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Option<Checkpoint>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Load a single checkpoint by its unique ID.
Source§

fn list_checkpoints<'life0, 'life1, 'async_trait>( &'life0 self, run_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Vec<Checkpoint>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

List all checkpoints recorded for a given run, ordered by creation time.
Source§

fn record_cost_entry<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, scope: &'life1 str, scope_id: &'life2 str, cost_usd: f64, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Durably record one cost-budget spend event. CostBudgetTracker (src/uar/runtime/cost_budget.rs) is intentionally in-memory-only for the hot path; this is the durable roll-up layer its own doc comment anticipated subscribing to. Default no-op so this remains additive for any future PersistenceLayer implementer that doesn’t need history.
Source§

fn list_cost_history<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, scope: &'life1 str, scope_id: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<Vec<CostEntry>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

List durable cost-history entries for a (scope, scope_id), ordered by recorded_at ascending.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<U> As for U

§

fn as_<T>(self) -> T
where T: CastFrom<U>, U: Sized,

Casts self to type T. The semantics of numeric casting with the as operator are followed, so <T as As>::as_::<U> can be used in the same way as T as U for numeric conversions. Read more
§

impl<T> AsyncFriendly for T
where T: Send + Sync + 'static,

Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<T> Conv for T

§

fn conv<T>(self) -> T
where Self: Into<T>,

Converts self into T using Into<T>. Read more
§

impl<T> ErasedDestructor for T
where T: 'static,

§

impl<T> FmtForward for T

§

fn fmt_binary(self) -> FmtBinary<Self>
where Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
§

fn fmt_display(self) -> FmtDisplay<Self>
where Self: Display,

Causes self to use its Display implementation when Debug-formatted.
§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>
where Self: LowerExp,

Causes self to use its LowerExp implementation when Debug-formatted.
§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>
where Self: LowerHex,

Causes self to use its LowerHex implementation when Debug-formatted.
§

fn fmt_octal(self) -> FmtOctal<Self>
where Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
§

fn fmt_pointer(self) -> FmtPointer<Self>
where Self: Pointer,

Causes self to use its Pointer implementation when Debug-formatted.
§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>
where Self: UpperExp,

Causes self to use its UpperExp implementation when Debug-formatted.
§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>
where Self: UpperHex,

Causes self to use its UpperHex implementation when Debug-formatted.
§

fn fmt_list(self) -> FmtList<Self>
where &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> FutureExt for T

§

fn with_context(self, otel_cx: Context) -> WithContext<Self>

Attaches the provided Context to this type, returning a WithContext wrapper. Read more
§

fn with_current_context(self) -> WithContext<Self>

Attaches the current Context to this type, returning a WithContext wrapper. Read more
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
§

impl<T> IntoRequest<T> for T

§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
§

impl<Unshared, Shared> IntoShared<Shared> for Unshared
where Shared: FromUnshared<Unshared>,

§

fn into_shared(self) -> Shared

Creates a shared type from an unshared type.
§

impl<L> LayerExt<L> for L

§

fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>
where L: Layer<S>,

Applies the layer to a service and wraps it in [Layered].
§

impl<T> MaybeSend for T
where T: Send,

§

impl<T> MaybeSend for T
where T: Send,

§

impl<T> Message for T
where T: Any + Send + 'static,

§

fn from_boxed(m: BoxedMessage) -> Result<Self, BoxedDowncastErr>

Convert a [BoxedMessage] to this concrete type
§

fn box_message(self, pid: &ActorId) -> Result<BoxedMessage, BoxedDowncastErr>

Convert this message to a [BoxedMessage]
§

impl<T> Pipe for T
where T: ?Sized,

§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> R
where Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> R
where R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> R
where R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
where Self: Borrow<B>, B: 'a + ?Sized, R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
§

fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
where Self: BorrowMut<B>, B: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe function. Read more
§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
where Self: AsRef<U>, U: 'a + ?Sized, R: 'a,

Borrows self, then passes self.as_ref() into the pipe function.
§

fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
where Self: AsMut<U>, U: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.as_mut() into the pipe function.
§

fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
where Self: Deref<Target = T>, T: 'a + ?Sized, R: 'a,

Borrows self, then passes self.deref() into the pipe function.
§

fn pipe_deref_mut<'a, T, R>( &'a mut self, func: impl FnOnce(&'a mut T) -> R, ) -> R
where Self: DerefMut<Target = T> + Deref, T: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe function.
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> Pointee for T

§

type Pointer = u32

§

fn debug( pointer: <T as Pointee>::Pointer, f: &mut Formatter<'_>, ) -> Result<(), Error>

§

impl<T> PolicyExt for T
where T: ?Sized,

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns Action::Follow. Read more
§

impl<T> PolicyExt for T
where T: ?Sized,

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns Action::Follow. Read more
§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
§

impl<T, S> SimdFrom<T, S> for T
where S: Simd,

§

fn simd_from(_simd: S, value: T) -> T

§

impl<F, T, S> SimdInto<T, S> for F
where T: SimdFrom<F, S>, S: Simd,

§

fn simd_into(self, simd: S) -> T

§

impl<T> State for T
where T: Any + Send + 'static,

§

impl<T> Tap for T

§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
where Self: Borrow<B>, B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
where Self: BorrowMut<B>, B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
where Self: AsRef<R>, R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
where Self: AsMut<R>, R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
where Self: Deref<Target = T>, T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
where Self: DerefMut<Target = T> + Deref, T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release builds.
§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
where Self: Borrow<B>, B: ?Sized,

Calls .tap_borrow() only in debug builds, and is erased in release builds.
§

fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
where Self: BorrowMut<B>, B: ?Sized,

Calls .tap_borrow_mut() only in debug builds, and is erased in release builds.
§

fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
where Self: AsRef<R>, R: ?Sized,

Calls .tap_ref() only in debug builds, and is erased in release builds.
§

fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
where Self: AsMut<R>, R: ?Sized,

Calls .tap_ref_mut() only in debug builds, and is erased in release builds.
§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
where Self: Deref<Target = T>, T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release builds.
§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Self
where Self: DerefMut<Target = T> + Deref, T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release builds.
§

impl<T> TryConv for T

§

fn try_conv<T>(self) -> Result<T, Self::Error>
where Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

impl<G1, G2> Within<G2> for G1
where G2: Contains<G1>,

§

fn is_within(&self, b: &G2) -> bool