pub struct Type<I>where
I: Layout,{
pub layout: <I as Layout>::TypeLayout,
pub annotations: Vec<Annotation>,
pub variant: TypeVariant<I>,
}Expand description
A C type.
Fields§
§layout: <I as Layout>::TypeLayoutThe layout of the type.
annotations: Vec<Annotation>The annotations on this type.
variant: TypeVariant<I>The variant of the type.
Implementations§
Source§impl<I> Type<I>where
I: Layout,
impl<I> Type<I>where
I: Layout,
Sourcepub fn into<J>(self) -> Type<J>where
J: Layout,
<I as Layout>::TypeLayout: Into<<J as Layout>::TypeLayout>,
<I as Layout>::FieldLayout: Into<<J as Layout>::FieldLayout>,
<I as Layout>::OpaqueLayout: Into<<J as Layout>::OpaqueLayout>,
pub fn into<J>(self) -> Type<J>where
J: Layout,
<I as Layout>::TypeLayout: Into<<J as Layout>::TypeLayout>,
<I as Layout>::FieldLayout: Into<<J as Layout>::FieldLayout>,
<I as Layout>::OpaqueLayout: Into<<J as Layout>::OpaqueLayout>,
Returns the identical type with the Layout converted.
Trait Implementations§
impl<I> Eq for Type<I>
impl<I> StructuralPartialEq for Type<I>where
I: Layout,
Auto Trait Implementations§
impl<I> Freeze for Type<I>
impl<I> RefUnwindSafe for Type<I>where
<I as Layout>::TypeLayout: RefUnwindSafe,
<I as Layout>::OpaqueLayout: RefUnwindSafe,
<I as Layout>::FieldLayout: RefUnwindSafe,
impl<I> Send for Type<I>where
<I as Layout>::TypeLayout: Send,
<I as Layout>::OpaqueLayout: Send,
<I as Layout>::FieldLayout: Send,
impl<I> Sync for Type<I>where
<I as Layout>::TypeLayout: Sync,
<I as Layout>::OpaqueLayout: Sync,
<I as Layout>::FieldLayout: Sync,
impl<I> Unpin for Type<I>where
<I as Layout>::TypeLayout: Unpin,
<I as Layout>::OpaqueLayout: Unpin,
<I as Layout>::FieldLayout: Unpin,
impl<I> UnwindSafe for Type<I>where
<I as Layout>::TypeLayout: UnwindSafe,
<I as Layout>::OpaqueLayout: UnwindSafe,
<I as Layout>::FieldLayout: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more