Trait shredder::FinalizeFields[][src]

pub unsafe trait FinalizeFields {
    unsafe fn finalize_fields(&mut self);
}
Expand description

A trait that lets you finalize all fields of a piece of data

This is useful for implementing Finalize itself, since it gives you a simple way to recursively finalize the fields.

You probably want to use #[derive(FinalizeFields)] to implement this :)

Safety

Implementing this has the same rules as implementing Finalize

Required methods

Do cleanup on this data’s fields, potentially leaving it in an invalid state.

Safety

After calling this method, you may not access anything contained in this data. You may not even drop this object! You must mem::forget it or otherwise force its destructor not to run.

Implementors