#[allow(missing_docs)]
#[repr(C)]
#[derive(Default)]
pub struct __IncompleteArrayField<T>(PhantomData<T>);
impl<T> __IncompleteArrayField<T>
{
#[allow(missing_docs)]
#[inline(always)]
pub fn new() -> Self
{
__IncompleteArrayField(PhantomData)
}
#[allow(missing_docs)]
#[inline(always)]
pub fn as_ptr(&self) -> *const T
{
unsafe{ transmute(self) }
}
#[allow(missing_docs)]
#[inline(always)]
pub fn as_mut_ptr(&mut self) -> *mut T
{
unsafe { transmute(self) }
}
#[allow(missing_docs)]
#[inline(always)]
pub fn as_slice(&self, length: usize) -> &[T]
{
unsafe { from_raw_parts(self.as_ptr(), length) }
}
#[allow(missing_docs)]
#[inline(always)]
pub fn as_mut_slice(&mut self, length: usize) -> &mut [T]
{
unsafe { from_raw_parts_mut(self.as_mut_ptr(), length) }
}
}
impl<T> Debug for __IncompleteArrayField<T>
{
#[inline(always)]
fn fmt(&self, fmt: &mut Formatter) -> fmt::Result
{
fmt.write_str("__IncompleteArrayField")
}
}
impl<T> Clone for __IncompleteArrayField<T>
{
#[inline(always)]
fn clone(&self) -> Self
{
Self::new()
}
}
impl<T> Copy for __IncompleteArrayField<T>
{
}