Trait CloneOps

Source
pub trait CloneOps: Send + Sync {
    // Required method
    fn custom_clone(&self) -> KernelObject;
}
Expand description

Clone operations capability

This trait represents the ability to properly clone an object with custom semantics. Objects that need special cloning behavior (like pipes that need to update reader/writer counts) should implement this.

The presence of this capability indicates that the object needs custom clone semantics beyond simple Arc::clone.

Required Methods§

Source

fn custom_clone(&self) -> KernelObject

Perform a custom clone operation and return the cloned object

This method should handle any object-specific cloning logic, such as incrementing reference counts for pipes or other shared resources. Returns the cloned object as a KernelObject.

Implementors§