Trait comet::internal::finalize_trait::FinalizeTrait[][src]

pub trait FinalizeTrait<T> {
    const NON_TRIVIAL_DTOR: bool;
    const CALLBACK: Option<FinalizationCallback>;
    extern "C" fn finalize(obj: *mut u8) { ... }
}
Expand description

The FinalizeTrait specifies how to finalize objects.

Associated Constants

If true finalizer is executed at the end of GC cycle for this type. In most cases compiler should be smart enough to determine if NON_TRIVIAL_DTOR is true but in some rare unsafe cases you might set it to false by yourself.

Finalization callback executed by GC at the end of GC cycle. It defaults to FinalizeTrait::finalize.

Provided methods

Callback that is executed at the end of GC cycle. It invokes T::drop by default.

Implementations on Foreign Types

Implementors