lash-core 0.1.0-alpha.36

Sans-IO turn machine and runtime kernel for the lash agent runtime.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use std::sync::Arc;

use crate::{AttachmentCreateMeta, AttachmentRef, AttachmentStore, AttachmentStoreError};

#[derive(Clone)]
pub struct ToolAttachmentControl {
    pub(super) store: Arc<dyn AttachmentStore>,
}

impl ToolAttachmentControl {
    pub fn put(
        &self,
        data: Vec<u8>,
        meta: AttachmentCreateMeta,
    ) -> Result<AttachmentRef, AttachmentStoreError> {
        self.store.put(data, meta)
    }
}