Struct repc::layout::Array [−][src]
pub struct Array<I> where
I: Layout, {
pub element_type: Box<Type<I>, Global>,
pub num_elements: Option<u64>,
}
Expand description
An array.
This corresponds to the type of T var[N]
in C.
Example
int i[1];
Array::<()> {
element_type: Box::new(Type {
layout: (),
annotations: vec!(),
variant: TypeVariant::Builtin(BuiltinType::Int),
}),
num_elements: Some(1),
};
Fields
element_type: Box<Type<I>, Global>
The type of elements of the array.
num_elements: Option<u64>
The number of elements in the array.
If this is None
, it corresponds to a flexible array in C.
Trait Implementations
Auto Trait Implementations
impl<I> RefUnwindSafe for Array<I> where
<I as Layout>::FieldLayout: RefUnwindSafe,
<I as Layout>::OpaqueLayout: RefUnwindSafe,
<I as Layout>::TypeLayout: RefUnwindSafe,
impl<I> Send for Array<I> where
<I as Layout>::FieldLayout: Send,
<I as Layout>::OpaqueLayout: Send,
<I as Layout>::TypeLayout: Send,
impl<I> Sync for Array<I> where
<I as Layout>::FieldLayout: Sync,
<I as Layout>::OpaqueLayout: Sync,
<I as Layout>::TypeLayout: Sync,
impl<I> UnwindSafe for Array<I> where
<I as Layout>::FieldLayout: UnwindSafe,
<I as Layout>::OpaqueLayout: UnwindSafe,
<I as Layout>::TypeLayout: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more