Struct repc_impl::layout::Array[][src]

pub struct Array<I: Layout> {
    pub element_type: Box<Type<I>>,
    pub num_elements: Option<u64>,
}

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>>

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

impl<I: Clone + Layout> Clone for Array<I>[src]

impl<I: Debug + Layout> Debug for Array<I>[src]

impl<I: Eq + Layout> Eq for Array<I>[src]

impl<I: PartialEq + Layout> PartialEq<Array<I>> for Array<I>[src]

impl<I: Layout> StructuralEq for Array<I>[src]

impl<I: Layout> StructuralPartialEq for Array<I>[src]

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
[src]

impl<I> Send for Array<I> where
    <I as Layout>::FieldLayout: Send,
    <I as Layout>::OpaqueLayout: Send,
    <I as Layout>::TypeLayout: Send
[src]

impl<I> Sync for Array<I> where
    <I as Layout>::FieldLayout: Sync,
    <I as Layout>::OpaqueLayout: Sync,
    <I as Layout>::TypeLayout: Sync
[src]

impl<I> Unpin for Array<I>[src]

impl<I> UnwindSafe for Array<I> where
    <I as Layout>::FieldLayout: UnwindSafe,
    <I as Layout>::OpaqueLayout: UnwindSafe,
    <I as Layout>::TypeLayout: UnwindSafe
[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.