#[repr(transparent)]
pub struct List<T: ToValue + FromValue>(_, _);
Expand description

List<A> wraps an OCaml 'a list without converting it to Rust, this introduces no additional overhead compared to a Value type

Implementations

An empty list

Returns the number of items in self

Returns true when the list is empty

Add an element to the front of the list returning the new list

List head

List tail

List as Vec

List as LinkedList

List iterator

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Convert from OCaml value

The type of the elements being iterated over.

Which kind of iterator are we turning this into?

Creates an iterator from a value. Read more

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

This method tests for !=.

Convert to OCaml value

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.