1use core::ops::{Deref, DerefMut};
4
5include!("./gen/tuple_as.rs");
6
7pub trait TupleAsRef<'a> {
9 type OutTuple: 'a;
10
11 fn as_ref(&'a self) -> Self::OutTuple;
13}
14
15pub trait TupleAsMut<'a> {
17 type OutTuple: 'a;
18
19 fn as_mut(&'a mut self) -> Self::OutTuple;
21}
22
23pub trait TupleAsOption {
25 type OutTuple;
26
27 fn as_some(self) -> Self::OutTuple;
29}
30
31pub trait TupleAsResultOk<E> {
33 type OutTuple;
34
35 fn as_ok(self) -> Self::OutTuple;
37}
38
39pub trait TupleAsResultErr<T> {
41 type OutTuple;
42
43 fn as_err(self) -> Self::OutTuple;
45}
46
47pub trait TupleAsDeref<'a> {
49 type OutTuple: 'a;
50
51 fn as_deref(&'a self) -> Self::OutTuple;
53}
54
55pub trait TupleAsDerefMut<'a> {
57 type OutTuple: 'a;
58
59 fn as_deref_mut(&'a mut self) -> Self::OutTuple;
61}