trait-kit 0.1.0

Module Standard Interface and Capability Management Center — A lightweight Rust library that provides a standard interface for module definition and Kit capability management.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// Copyright © 2026 Kirky.X. All rights reserved.
// TC-COMPILE-004: capability not Send+Sync should fail to compile

use trait_kit::prelude::*;

// A trait that is NOT Send+Sync
trait NotSendSync {
    fn do_something(&self);
}

struct BadKey;

impl CapabilityKey for BadKey {
    type Capability = dyn NotSendSync; // WRONG: NotSendSync does not implement Send+Sync
    const NAME: &'static str = "bad";
}

fn main() {}