apcore 0.22.0

Schema-driven module standard for AI-perceivable interfaces
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// This file MUST NOT compile -- verifies AC-015
// Identity fields are private and cannot be mutated after construction.
use apcore::context::Identity;
use std::collections::HashMap;

fn main() {
    let mut identity = Identity::new(
        "user-1".to_string(),
        "user".to_string(),
        vec!["admin".to_string()],
        HashMap::new(),
    );
    identity.roles = vec![]; // ERROR: field `roles` is private
}