Skip to main content

IntoList

Trait IntoList 

pub trait IntoList {
    type Output<T: EmptyList>: List;

    // Required method
    fn into_list<T>(self) -> Self::Output<T>
       where T: EmptyList;
}
Expand description

Moves source fields into a type-level List.

§Examples

use cel_runtime::{IntoList, List};
let list = (String::from("first"), 7u8).into_list::<()>();
assert_eq!(list.head(), "first");

Required Associated Types§

type Output<T: EmptyList>: List

The resulting List type using T as the empty list type family.

Required Methods§

fn into_list<T>(self) -> Self::Output<T>
where T: EmptyList,

Moves fields into a List using T as the empty list type family.

  • Complexity: O(n) field moves for the native tuple bridges, without allocation.
§Examples

See IntoList.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

§

impl IntoList for ()

§

fn into_list<T>(self) -> <() as IntoList>::Output<T>
where T: EmptyList,

Constructs the requested family’s empty root.

§

type Output<T: EmptyList> = <T as List>::Empty

§

impl<A, B, C, D, E, F, G, H, I, J, K, L> IntoList for (A, B, C, D, E, F, G, H, I, J, K, L)
where A: 'static, B: 'static, C: 'static, D: 'static, E: 'static, F: 'static, G: 'static, H: 'static, I: 'static, J: 'static, K: 'static, L: 'static,

§

fn into_list<T>( self, ) -> <(A, B, C, D, E, F, G, H, I, J, K, L) as IntoList>::Output<T>
where T: EmptyList,

Moves source fields into the requested list family without cloning.

  • Complexity: O(n) field moves for n tuple fields.
§

type Output<T: EmptyList> = <<(B, C, D, E, F, G, H, I, J, K, L) as IntoList>::Output<T> as List>::Push<A>

§

impl<A, B, C, D, E, F, G, H, I, J, K> IntoList for (A, B, C, D, E, F, G, H, I, J, K)
where A: 'static, B: 'static, C: 'static, D: 'static, E: 'static, F: 'static, G: 'static, H: 'static, I: 'static, J: 'static, K: 'static,

§

fn into_list<T>( self, ) -> <(A, B, C, D, E, F, G, H, I, J, K) as IntoList>::Output<T>
where T: EmptyList,

Moves source fields into the requested list family without cloning.

  • Complexity: O(n) field moves for n tuple fields.
§

type Output<T: EmptyList> = <<(B, C, D, E, F, G, H, I, J, K) as IntoList>::Output<T> as List>::Push<A>

§

impl<A, B, C, D, E, F, G, H, I, J> IntoList for (A, B, C, D, E, F, G, H, I, J)
where A: 'static, B: 'static, C: 'static, D: 'static, E: 'static, F: 'static, G: 'static, H: 'static, I: 'static, J: 'static,

§

fn into_list<T>(self) -> <(A, B, C, D, E, F, G, H, I, J) as IntoList>::Output<T>
where T: EmptyList,

Moves source fields into the requested list family without cloning.

  • Complexity: O(n) field moves for n tuple fields.
§

type Output<T: EmptyList> = <<(B, C, D, E, F, G, H, I, J) as IntoList>::Output<T> as List>::Push<A>

§

impl<A, B, C, D, E, F, G, H, I> IntoList for (A, B, C, D, E, F, G, H, I)
where A: 'static, B: 'static, C: 'static, D: 'static, E: 'static, F: 'static, G: 'static, H: 'static, I: 'static,

§

fn into_list<T>(self) -> <(A, B, C, D, E, F, G, H, I) as IntoList>::Output<T>
where T: EmptyList,

Moves source fields into the requested list family without cloning.

  • Complexity: O(n) field moves for n tuple fields.
§

type Output<T: EmptyList> = <<(B, C, D, E, F, G, H, I) as IntoList>::Output<T> as List>::Push<A>

§

impl<A, B, C, D, E, F, G, H> IntoList for (A, B, C, D, E, F, G, H)
where A: 'static, B: 'static, C: 'static, D: 'static, E: 'static, F: 'static, G: 'static, H: 'static,

§

fn into_list<T>(self) -> <(A, B, C, D, E, F, G, H) as IntoList>::Output<T>
where T: EmptyList,

Moves source fields into the requested list family without cloning.

  • Complexity: O(n) field moves for n tuple fields.
§

type Output<T: EmptyList> = <<(B, C, D, E, F, G, H) as IntoList>::Output<T> as List>::Push<A>

§

impl<A, B, C, D, E, F, G> IntoList for (A, B, C, D, E, F, G)
where A: 'static, B: 'static, C: 'static, D: 'static, E: 'static, F: 'static, G: 'static,

§

fn into_list<T>(self) -> <(A, B, C, D, E, F, G) as IntoList>::Output<T>
where T: EmptyList,

Moves source fields into the requested list family without cloning.

  • Complexity: O(n) field moves for n tuple fields.
§

type Output<T: EmptyList> = <<(B, C, D, E, F, G) as IntoList>::Output<T> as List>::Push<A>

§

impl<A, B, C, D, E, F> IntoList for (A, B, C, D, E, F)
where A: 'static, B: 'static, C: 'static, D: 'static, E: 'static, F: 'static,

§

fn into_list<T>(self) -> <(A, B, C, D, E, F) as IntoList>::Output<T>
where T: EmptyList,

Moves source fields into the requested list family without cloning.

  • Complexity: O(n) field moves for n tuple fields.
§

type Output<T: EmptyList> = <<(B, C, D, E, F) as IntoList>::Output<T> as List>::Push<A>

§

impl<A, B, C, D, E> IntoList for (A, B, C, D, E)
where A: 'static, B: 'static, C: 'static, D: 'static, E: 'static,

§

fn into_list<T>(self) -> <(A, B, C, D, E) as IntoList>::Output<T>
where T: EmptyList,

Moves source fields into the requested list family without cloning.

  • Complexity: O(n) field moves for n tuple fields.
§

type Output<T: EmptyList> = <<(B, C, D, E) as IntoList>::Output<T> as List>::Push<A>

§

impl<A, B, C, D> IntoList for (A, B, C, D)
where A: 'static, B: 'static, C: 'static, D: 'static,

§

fn into_list<T>(self) -> <(A, B, C, D) as IntoList>::Output<T>
where T: EmptyList,

Moves source fields into the requested list family without cloning.

  • Complexity: O(n) field moves for n tuple fields.
§

type Output<T: EmptyList> = <<(B, C, D) as IntoList>::Output<T> as List>::Push<A>

§

impl<A, B, C> IntoList for (A, B, C)
where A: 'static, B: 'static, C: 'static,

§

fn into_list<T>(self) -> <(A, B, C) as IntoList>::Output<T>
where T: EmptyList,

Moves source fields into the requested list family without cloning.

  • Complexity: O(n) field moves for n tuple fields.
§

type Output<T: EmptyList> = <<(B, C) as IntoList>::Output<T> as List>::Push<A>

§

impl<A, B> IntoList for (A, B)
where A: 'static, B: 'static,

§

fn into_list<T>(self) -> <(A, B) as IntoList>::Output<T>
where T: EmptyList,

Moves both source fields into the requested list family without cloning.

  • Complexity: O(n) field moves for n tuple fields.
§

type Output<T: EmptyList> = <<(B,) as IntoList>::Output<T> as List>::Push<A>

§

impl<A> IntoList for (A,)
where A: 'static,

§

fn into_list<T>(self) -> <(A,) as IntoList>::Output<T>
where T: EmptyList,

Moves the singleton source field into the requested list family.

§

type Output<T: EmptyList> = <<T as List>::Empty as List>::Push<A>

Implementors§