weave-compliance · regulatory
Source declarations, signatures and documentation for regulatory.
Reviewed implementation boundary: The compliance module contains prototype/placeholder behavior. Production in a type name does not establish implemented audit integrity, verified signatures, governance encryption, regulatory submission, or a compliance certification. Read /libraries/weave-compliance/overview and the corresponding task guide for current boundaries.
Source: sigil/weave/libs/weave-compliance/src/regulatory.rs. SHA-256: 0550fe1c2e618c1b157624bf5b5501d56e5cf02eab0b89404a512241b6ffd8a8.
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.
regulatory::ReportingPeriod
A period enum for regulatory reports (simplified) Report period granularity
#[derive(Debug, Clone, Copy, Serialize, Deserialize)]
pub enum ReportingPeriod {
/// Monthly reporting period
Monthly,
/// Quarterly reporting period
Quarterly,
/// Yearly reporting period
Yearly,
}Source line: 11.
regulatory::RegulatoryData
Aggregated data used to build regulatory reports
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct RegulatoryData {
/// placeholder sections keyed by regulation-specific names
pub sections: HashMap<String, serde_json::Value>
}Source line: 22.
regulatory::RegulatoryData::extract_gdpr_data
Extract data for GDPR
pub fn extract_gdpr_data(&self) -> Result<serde_json::Value>;Source line: 29.
regulatory::RegulatoryReport
Regulatory report
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct RegulatoryReport {
/// regulation label
pub regulation: String,
/// period covered
pub period: ReportingPeriod,
/// generated timestamp
pub generated_at: chrono::DateTime<Utc>,
/// overall compliance status (placeholder)
pub compliance_status: String
}Source line: 36.
regulatory::SubmissionResult
Result of submission to a regulator
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct SubmissionResult {
/// submission id
pub submission_id: String,
/// status e.g. "accepted", "queued"
pub status: String
}Source line: 49.
regulatory::RegulatoryReportGenerator
Reporting interface for specific regulations
#[async_trait::async_trait]
pub trait RegulatoryReportGenerator: Send + Sync {
/// Generate a report from aggregated data
async fn generate_report(
&self,
data: RegulatoryData,
period: ReportingPeriod,
) -> Result<RegulatoryReport>;
}Source line: 58.
regulatory::RegulatoryReporter
Reporter for orchestrating regulatory reporting flows
#[async_trait::async_trait]
pub trait RegulatoryReporter: Send + Sync {
/// Generate a regulatory report for a regulation and period
async fn generate_regulatory_report(
&self,
regulation: &str,
period: ReportingPeriod,
) -> Result<RegulatoryReport>;
/// Submit a completed regulatory report
async fn submit_regulatory_report(&self, report: RegulatoryReport) -> Result<SubmissionResult>;
}Source line: 69.
regulatory::ComplianceReporter
Compliance reporting interface (used by ProductionComplianceFramework)
#[async_trait::async_trait]
pub trait ComplianceReporter: Send + Sync {
/// Validate a report or operation and record evidence
async fn validate_and_record(&self, _reg: &str) -> Result<EvidenceId>;
}Source line: 82.
regulatory::ProductionRegulatoryReporter
Production regulatory reporter
pub struct ProductionRegulatoryReporter {
}Source line: 88.
regulatory::ProductionRegulatoryReporter::new
Create a new registry
pub fn new() -> Self;Source line: 94.
regulatory::ProductionRegulatoryReporter::register
Register a generator by regulation name
pub async fn register(&self, name: &str, gen: Arc<dyn RegulatoryReportGenerator>);Source line: 100.
regulatory::GdprComplianceEngine
GDPR generator (example)
pub struct GdprComplianceEngine;Source line: 147.