Struct linked_array::Cons [] [src]

pub struct Cons<T, L>(pub T, pub L);

The type used for a non-empty array. Analogous to a cons cell in a linked list.

Trait Implementations

impl<T: Copy, L: Copy> Copy for Cons<T, L>
[src]

impl<T: Clone, L: Clone> Clone for Cons<T, L>
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl<T: Debug, L: Debug> Debug for Cons<T, L>
[src]

[src]

Formats the value using the given formatter. Read more

impl<T: PartialEq, L: PartialEq> PartialEq for Cons<T, L>
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

[src]

This method tests for !=.

impl<T: Eq, L: Eq> Eq for Cons<T, L>
[src]

impl<T: PartialOrd, L: PartialOrd> PartialOrd for Cons<T, L>
[src]

[src]

This method returns an ordering between self and other values if one exists. Read more

[src]

This method tests less than (for self and other) and is used by the < operator. Read more

[src]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

[src]

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl<T: Ord, L: Ord> Ord for Cons<T, L>
[src]

[src]

This method returns an Ordering between self and other. Read more

1.21.0
[src]

Compares and returns the maximum of two values. Read more

1.21.0
[src]

Compares and returns the minimum of two values. Read more

impl<T, L: Array<T>> Array<T> for Cons<T, L>
[src]

[src]

Access the element at idx, or None if out of bounds.

[src]

Get the compile-time length of the array.

[src]

Since the in-memory representation should be the same as a traditional array, it should be safe to read the pointer as one. However, since the rust specification makes memory layout undefined, it is held behind unsafe. Read more

[src]

A conveinence wrapper around len that takes a refernce to facilitate using the right type.

impl<T, S, L: Map<T, S>> Map<T, S> for Cons<T, L>
[src]

The resulting Array from performing the map.

[src]

Transform the elements of the array using the provided function.

Auto Trait Implementations

impl<T, L> Send for Cons<T, L> where
    L: Send,
    T: Send

impl<T, L> Sync for Cons<T, L> where
    L: Sync,
    T: Sync