strand-blobs · policy
Source declarations, signatures and documentation for policy.
Reviewed implementation boundary: The current GC path quarantines records without reclaiming their stored files. Check actual writer/list/report interfaces and partial-write behavior in /libraries/strand-blobs/overview.
Source: sigil/weave/models/strand-blobs/src/policy.rs. SHA-256: c642c64d1775a4887af70f8d9168f8b799bc3859a04b31903f3b6ef33d2f6429.
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.
Module condition:
#[cfg(feature = "policy-hooks")]policy::BlobPolicy
#[cfg(feature = "policy-hooks")]
pub trait BlobPolicy: Send + Sync + 'static {
fn can_put(&self, size: u64, metadata: &Option<serde_json::Value>) -> bool;
fn can_delete(&self, id_hex: &str) -> bool;
}Source line: 3.
policy::AllowAllBlobPolicy
#[cfg(feature = "policy-hooks")]
pub struct AllowAllBlobPolicy;Source line: 8.
policy::BLOB_POLICY
#[cfg(feature = "policy-hooks")]
pub static BLOB_POLICY: OnceCell<Box<dyn BlobPolicy>>;Source line: 19.
policy::set_blob_policy
#[cfg(feature = "policy-hooks")]
pub fn set_blob_policy(policy: Box<dyn BlobPolicy>) -> Result<(), Box<dyn BlobPolicy>>;Source line: 21.