1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
//! As X

use core::ops::{Deref, DerefMut};

include!("./gen/tuple_as.rs");

/// AsRef for Tuple
pub trait TupleAsRef<'a> {
    type OutTuple: 'a;

    /// AsRef for Tuple
    fn as_ref(&'a self) -> Self::OutTuple;
}

/// AsMut for Tuple
pub trait TupleAsMut<'a> {
    type OutTuple: 'a;

    /// AsMut for Tuple
    fn as_mut(&'a mut self) -> Self::OutTuple;
}

/// Mapping item to `Option` for Tuple
pub trait TupleAsOption {
    type OutTuple;

    /// Mapping item to `Option::Some` for Tuple
    fn as_some(self) -> Self::OutTuple;
}

/// Mapping item to `Result` for Tuple
pub trait TupleAsResultOk<E> {
    type OutTuple;

    /// Mapping item to `Result::Ok` for Tuple
    fn as_ok(self) -> Self::OutTuple;
}

/// Mapping item to `Result` for Tuple
pub trait TupleAsResultErr<T> {
    type OutTuple;

    /// Mapping item to `Result::Err` for Tuple
    fn as_err(self) -> Self::OutTuple;
}

/// AsDeref for Tuple
pub trait TupleAsDeref<'a> {
    type OutTuple: 'a;

    /// AsDeref for Tuple
    fn as_deref(&'a self) -> Self::OutTuple;
}

/// AsDerefMut for Tuple
pub trait TupleAsDerefMut<'a> {
    type OutTuple: 'a;

    /// AsDerefMut for Tuple
    fn as_deref_mut(&'a mut self) -> Self::OutTuple;
}