Module attachment

Module attachment 

Source
Expand description

Module containing the main attachment data structure

Re-exportsยง

pub use self::raw::RawAttachment;
pub use self::raw::RawAttachmentRef;

Modulesยง

data ๐Ÿ”’
This module encapsulates the fields of the AttachmentData. Since this is the only place they are visible, this means that the type of the AttachmentVtable is guaranteed to always be in sync with the type of the actual attachment. This follows from the fact that they are in sync when created and that the API offers no way to change the AttachmentVtable or attachment type after creation.
raw ๐Ÿ”’
This module encapsulates the fields of the RawAttachment and RawAttachmentRef. Since this is the only place they are visible, this means that the ptr field of both types is always guaranteed to come from Box<AttachmentData<A>>. This follows from the fact that there are no places where the ptr field is altered after creation (besides invalidating it after it should no longer be used).
vtable ๐Ÿ”’
Vtable for type-erased attachment operations.