"Asahi Lina" <lina@xxxxxxxxxxxxx> writes: > By analogy to AlwaysRefCounted and ARef, an Ownable type is a (typically > C FFI) type that *may* be owned by Rust, but need not be. Unlike > AlwaysRefCounted, this mechanism expects the reference to be unique > within Rust, and does not allow cloning. > > Conceptually, this is similar to a KBox<T>, except that it delegates > resource management to the T instead of using a generic allocator. > > Signed-off-by: Asahi Lina <lina@xxxxxxxxxxxxx> Over all looks good to me - I agree with the points already discussed. Could you put it in a separate module and file? `kernel::types::ownable` and then `pub use` in `types.rs`. `types.rs` is getting quite busy. Best regards, Andreas Hindborg