autocxx

Trait WithinUniquePtrTrivial

Source
pub trait WithinUniquePtrTrivial:
    UniquePtrTarget
    + Sized
    + Unpin {
    // Required method
    fn within_unique_ptr(self) -> UniquePtr<Self> ;
}
Expand description

Emulates the WithinUniquePtr trait, but for trivial (plain old data) types. This allows such types to behave identically if a type is changed from generate! to generate_pod!.

(Ideally, this would be the exact same trait as WithinUniquePtr but this runs the risk of conflicting implementations. Negative trait bounds would solve this!)

Required Methods§

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§