[][src]Trait heterovec::HeteroSizedPush

pub unsafe trait HeteroSizedPush<T: ?Sized> {
    unsafe fn elem_size(&self) -> usize;
unsafe fn elem_align(&self) -> usize;
unsafe fn elem_ptr(&self) -> *const T;
unsafe fn elem_drop_handler(&self) -> fn(_: *mut u8, _: usize);
unsafe fn outer_drop(&mut self); }

Types that can be pushed onto a HeteroSizedVec.

Not meant to be implemented outside of the heterovec crate.

Required methods

unsafe fn elem_size(&self) -> usize

unsafe fn elem_align(&self) -> usize

unsafe fn elem_ptr(&self) -> *const T

unsafe fn elem_drop_handler(&self) -> fn(_: *mut u8, _: usize)

unsafe fn outer_drop(&mut self)

Assume that ownership of the pointee has been taken through unsafe means, but if there is some destructable wrapper around that (eg. a Box), clean that up, but without dropping the inner element.

Loading content...

Implementations on Foreign Types

impl<'a, I: Copy> HeteroSizedPush<[I]> for &'a [I][src]

impl<I> HeteroSizedPush<[I]> for Vec<I>[src]

impl<'a> HeteroSizedPush<str> for &'a str[src]

impl<T: ?Sized> HeteroSizedPush<T> for Box<dyn HeteroSizedPush<T>>[src]

Loading content...

Implementors

impl<T: ?Sized, E: Unsize<T>> HeteroSizedPush<T> for InPlace<E>[src]

Loading content...