Weave documentation
Rust referenceweave-agentfs

weave-agentfs · metadata

Source declarations, signatures and documentation for metadata.

Source: sigil/weave/local/agentfs/src/metadata.rs. SHA-256: 980c7dfd43efddc509dd76db632dd3e0c9d48e10b9405ebab14f1443808494c0.

This reference follows declared source modules, retains conditional attributes, and includes public declarations and implementation methods. Private-module re-exports and trait resolution require the compiler; this is a source reference, not a claim that every listed item is a root import. Function bodies and constant values are omitted.

metadata::MetadataValidator

JSON Schema validator for metadata

pub struct MetadataValidator {

}

Source line: 15.

metadata::MetadataValidator::new

pub fn new(schema: &serde_json::Value) -> Result<Self>;

Source line: 20.

metadata::MetadataValidator::validate

pub fn validate(&self, value: &serde_json::Value) -> Result<()>;

Source line: 27.

metadata::MetadataStore

Metadata storage trait

#[async_trait]
pub trait MetadataStore: Send + Sync {
    /// Get metadata for a path
    async fn get(&self, path: &Path) -> Result<Option<Value>>;

    /// Put metadata for a path
    async fn put(&self, path: &Path, value: Value) -> Result<()>;

    /// Delete metadata for a path
    async fn del(&self, path: &Path) -> Result<()>;

    /// List all metadata keys
    async fn list(&self) -> Result<Vec<PathBuf>>;
}

Source line: 41.

metadata::MemoryMetadataStore

In-memory metadata store

#[derive(Debug, Default)]
pub struct MemoryMetadataStore {

}

Source line: 57.

metadata::MemoryMetadataStore::new

pub fn new() -> Self;

Source line: 62.

metadata::MetadataHooks

Metadata hooks for custom metadata handling

#[derive(Default)]
pub struct MetadataHooks {
/// Get hook

pub get: Option<MetadataGetHook>,
/// Put hook

pub put: Option<MetadataPutHook>,
/// Delete hook

pub del: Option<MetadataDeleteHook>
}

Source line: 94.

metadata::MetadataHooks::from_map

Create hooks from a HashMap

pub fn from_map(map: std::sync::Arc<tokio::sync::RwLock<HashMap<PathBuf, Value>>>) -> Self;

Source line: 107.

On this page