Skip to main content

IntoList

Trait IntoList 

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

    // Required method
    fn into_list<T: EmptyList>(self) -> Self::Output<T>;
}
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§

Source

type Output<T: EmptyList>: List

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

Required Methods§

Source

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

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§

Source§

impl IntoList for ()

Source§

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

Constructs the requested family’s empty root.

Source§

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

Source§

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

Source§

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

Moves source fields into the requested list family without cloning.

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

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

Source§

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

Source§

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

Moves source fields into the requested list family without cloning.

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

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

Source§

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

Source§

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

Moves source fields into the requested list family without cloning.

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

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

Source§

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

Source§

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

Moves source fields into the requested list family without cloning.

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

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

Source§

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

Source§

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

Moves source fields into the requested list family without cloning.

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

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

Source§

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

Source§

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

Moves source fields into the requested list family without cloning.

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

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

Source§

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

Source§

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

Moves source fields into the requested list family without cloning.

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

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

Source§

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

Source§

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

Moves source fields into the requested list family without cloning.

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

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

Source§

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

Source§

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

Moves source fields into the requested list family without cloning.

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

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

Source§

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

Source§

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

Moves source fields into the requested list family without cloning.

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

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

Source§

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

Source§

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

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

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

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

Source§

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

Source§

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

Moves the singleton source field into the requested list family.

Source§

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

Implementors§