Why this trait can't be used as trait object

⚓ Rust    📅 2025-12-03    👤 surdeus    👁️ 1      

surdeus

trait MemPool {
    fn allocate(self: Pin<&mut Self>) -> Result<*mut ListHead, bool>;
    fn deallocate(self: Pin<&mut Self>, head: *mut ListHead);
}

It seems this defination does not volatile the rules

3 posts - 2 participants

Read full topic

🏷️ Rust_feed