pub trait ContextArtifactAccess:
Send
+ Sync
+ 'static {
// Required methods
fn create_artifact(
&self,
request: CreateArtifactRequest<'_>,
) -> Result<ContextArtifact>;
fn append_artifact(
&self,
thread_id: &ThreadId,
artifact_id: &ContextArtifactId,
bytes: &[u8],
) -> Result<ContextArtifact>;
fn list_artifacts(
&self,
thread_id: &ThreadId,
) -> Result<Vec<ContextArtifact>>;
fn read_artifact(
&self,
thread_id: &ThreadId,
artifact_id: &ContextArtifactId,
start_line: usize,
limit: usize,
) -> Result<ArtifactReadPage>;
fn grep_artifact(
&self,
thread_id: &ThreadId,
artifact_id: &ContextArtifactId,
query: &str,
offset: usize,
limit: usize,
) -> Result<ArtifactGrepPage>;
fn tail_artifact(
&self,
thread_id: &ThreadId,
artifact_id: &ContextArtifactId,
lines: usize,
) -> Result<ArtifactTailPage>;
fn delete_artifact(
&self,
thread_id: &ThreadId,
artifact_id: &ContextArtifactId,
) -> Result<bool>;
}Required Methods§
fn create_artifact( &self, request: CreateArtifactRequest<'_>, ) -> Result<ContextArtifact>
fn append_artifact( &self, thread_id: &ThreadId, artifact_id: &ContextArtifactId, bytes: &[u8], ) -> Result<ContextArtifact>
fn list_artifacts(&self, thread_id: &ThreadId) -> Result<Vec<ContextArtifact>>
fn read_artifact( &self, thread_id: &ThreadId, artifact_id: &ContextArtifactId, start_line: usize, limit: usize, ) -> Result<ArtifactReadPage>
fn grep_artifact( &self, thread_id: &ThreadId, artifact_id: &ContextArtifactId, query: &str, offset: usize, limit: usize, ) -> Result<ArtifactGrepPage>
fn tail_artifact( &self, thread_id: &ThreadId, artifact_id: &ContextArtifactId, lines: usize, ) -> Result<ArtifactTailPage>
fn delete_artifact( &self, thread_id: &ThreadId, artifact_id: &ContextArtifactId, ) -> Result<bool>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".