#[fp_macros::document_module]
pub(crate) mod inner {
use {
crate::{
classes::{
Lift,
RefLift,
},
dispatch::{
Ref,
Val,
},
kinds::*,
},
fp_macros::*,
};
#[document_type_parameters(
"The lifetime of the values.",
"The brand of the context.",
"The type of the first value.",
"The type of the second value.",
"The type of the result.",
"The first container type (owned or borrowed), inferred from the argument.",
"The second container type (owned or borrowed), inferred from the argument.",
"Dispatch marker type, inferred automatically."
)]
#[document_parameters("The closure implementing this dispatch.")]
pub trait Lift2Dispatch<'a, Brand: Kind_cdc7cd43dac7585f, A: 'a, B: 'a, C: 'a, FA, FB, Marker> {
#[document_signature]
#[document_parameters("The first context.", "The second context.")]
#[document_returns("A new context containing the result.")]
#[document_examples]
fn dispatch(
self,
fa: FA,
fb: FB,
) -> Apply!(<Brand as Kind!( type Of<'a, T: 'a>: 'a; )>::Of<'a, C>);
}
#[document_type_parameters(
"The lifetime.",
"The brand.",
"The first type.",
"The second type.",
"The result type.",
"The closure type."
)]
#[document_parameters("The closure that takes owned values.")]
impl<'a, Brand, A, B, C, F>
Lift2Dispatch<
'a,
Brand,
A,
B,
C,
Apply!(<Brand as Kind!( type Of<'a, T: 'a>: 'a; )>::Of<'a, A>),
Apply!(<Brand as Kind!( type Of<'a, T: 'a>: 'a; )>::Of<'a, B>),
Val,
> for F
where
Brand: Lift,
A: Clone + 'a,
B: Clone + 'a,
C: 'a,
F: Fn(A, B) -> C + 'a,
{
#[document_signature]
#[document_parameters("The first context.", "The second context.")]
#[document_returns("A new context containing the result.")]
#[document_examples]
fn dispatch(
self,
fa: Apply!(<Brand as Kind!( type Of<'a, T: 'a>: 'a; )>::Of<'a, A>),
fb: Apply!(<Brand as Kind!( type Of<'a, T: 'a>: 'a; )>::Of<'a, B>),
) -> Apply!(<Brand as Kind!( type Of<'a, T: 'a>: 'a; )>::Of<'a, C>) {
Brand::lift2(self, fa, fb)
}
}
#[document_type_parameters(
"The lifetime.",
"The borrow lifetime.",
"The brand.",
"The first type.",
"The second type.",
"The result type.",
"The closure type."
)]
#[document_parameters("The closure that takes references.")]
impl<'a, 'b, Brand, A, B, C, F>
Lift2Dispatch<
'a,
Brand,
A,
B,
C,
&'b Apply!(<Brand as Kind!( type Of<'a, T: 'a>: 'a; )>::Of<'a, A>),
&'b Apply!(<Brand as Kind!( type Of<'a, T: 'a>: 'a; )>::Of<'a, B>),
Ref,
> for F
where
Brand: RefLift,
A: 'a,
B: 'a,
C: 'a,
F: Fn(&A, &B) -> C + 'a,
{
#[document_signature]
#[document_parameters(
"A reference to the first context.",
"A reference to the second context."
)]
#[document_returns("A new context containing the result.")]
#[document_examples]
fn dispatch(
self,
fa: &'b Apply!(<Brand as Kind!( type Of<'a, T: 'a>: 'a; )>::Of<'a, A>),
fb: &'b Apply!(<Brand as Kind!( type Of<'a, T: 'a>: 'a; )>::Of<'a, B>),
) -> Apply!(<Brand as Kind!( type Of<'a, T: 'a>: 'a; )>::Of<'a, C>) {
Brand::ref_lift2(self, fa, fb)
}
}
#[document_type_parameters(
"The lifetime.",
"The brand.",
"First type.",
"Second type.",
"Third type.",
"Result type.",
"The first container type (owned or borrowed), inferred from the argument.",
"The second container type (owned or borrowed), inferred from the argument.",
"The third container type (owned or borrowed), inferred from the argument.",
"Dispatch marker."
)]
#[document_parameters("The closure implementing this dispatch.")]
pub trait Lift3Dispatch<
'a,
Brand: Kind_cdc7cd43dac7585f,
A: 'a,
B: 'a,
C: 'a,
D: 'a,
FA,
FB,
FC,
Marker,
> {
#[document_signature]
#[document_parameters("First context.", "Second context.", "Third context.")]
#[document_returns("A new context containing the result.")]
#[document_examples]
fn dispatch(
self,
fa: FA,
fb: FB,
fc: FC,
) -> Apply!(<Brand as Kind!( type Of<'a, T: 'a>: 'a; )>::Of<'a, D>);
}
#[document_type_parameters(
"The lifetime.",
"The brand.",
"First.",
"Second.",
"Third.",
"Result.",
"Closure."
)]
#[document_parameters("The closure that takes owned values.")]
impl<'a, Brand, A, B, C, D, F>
Lift3Dispatch<
'a,
Brand,
A,
B,
C,
D,
Apply!(<Brand as Kind!( type Of<'a, T: 'a>: 'a; )>::Of<'a, A>),
Apply!(<Brand as Kind!( type Of<'a, T: 'a>: 'a; )>::Of<'a, B>),
Apply!(<Brand as Kind!( type Of<'a, T: 'a>: 'a; )>::Of<'a, C>),
Val,
> for F
where
Brand: Lift,
A: Clone + 'a,
B: Clone + 'a,
C: Clone + 'a,
D: 'a,
F: Fn(A, B, C) -> D + 'a,
{
#[document_signature]
#[document_parameters("First context.", "Second context.", "Third context.")]
#[document_returns("A new context containing the result.")]
#[document_examples]
fn dispatch(
self,
fa: Apply!(<Brand as Kind!( type Of<'a, T: 'a>: 'a; )>::Of<'a, A>),
fb: Apply!(<Brand as Kind!( type Of<'a, T: 'a>: 'a; )>::Of<'a, B>),
fc: Apply!(<Brand as Kind!( type Of<'a, T: 'a>: 'a; )>::Of<'a, C>),
) -> Apply!(<Brand as Kind!( type Of<'a, T: 'a>: 'a; )>::Of<'a, D>) {
Brand::lift2(move |(a, b), c| self(a, b, c), Brand::lift2(|a, b| (a, b), fa, fb), fc)
}
}
#[document_type_parameters(
"The lifetime.",
"The borrow lifetime.",
"The brand.",
"First.",
"Second.",
"Third.",
"Result.",
"Closure."
)]
#[document_parameters("The closure that takes references.")]
impl<'a, 'b, Brand, A, B, C, D, F>
Lift3Dispatch<
'a,
Brand,
A,
B,
C,
D,
&'b Apply!(<Brand as Kind!( type Of<'a, T: 'a>: 'a; )>::Of<'a, A>),
&'b Apply!(<Brand as Kind!( type Of<'a, T: 'a>: 'a; )>::Of<'a, B>),
&'b Apply!(<Brand as Kind!( type Of<'a, T: 'a>: 'a; )>::Of<'a, C>),
Ref,
> for F
where
Brand: RefLift,
A: Clone + 'a,
B: Clone + 'a,
C: 'a,
D: 'a,
F: Fn(&A, &B, &C) -> D + 'a,
{
#[document_signature]
#[document_parameters("First context.", "Second context.", "Third context.")]
#[document_returns("A new context containing the result.")]
#[document_examples]
fn dispatch(
self,
fa: &'b Apply!(<Brand as Kind!( type Of<'a, T: 'a>: 'a; )>::Of<'a, A>),
fb: &'b Apply!(<Brand as Kind!( type Of<'a, T: 'a>: 'a; )>::Of<'a, B>),
fc: &'b Apply!(<Brand as Kind!( type Of<'a, T: 'a>: 'a; )>::Of<'a, C>),
) -> Apply!(<Brand as Kind!( type Of<'a, T: 'a>: 'a; )>::Of<'a, D>) {
Brand::ref_lift2(
move |(a, b): &(A, B), c: &C| self(a, b, c),
&Brand::ref_lift2(|a: &A, b: &B| (a.clone(), b.clone()), fa, fb),
fc,
)
}
}
#[document_type_parameters(
"The lifetime.",
"The brand.",
"First.",
"Second.",
"Third.",
"Fourth.",
"Result.",
"The first container type (owned or borrowed), inferred from the argument.",
"The second container type (owned or borrowed), inferred from the argument.",
"The third container type (owned or borrowed), inferred from the argument.",
"The fourth container type (owned or borrowed), inferred from the argument.",
"Dispatch marker."
)]
#[document_parameters("The closure implementing this dispatch.")]
pub trait Lift4Dispatch<
'a,
Brand: Kind_cdc7cd43dac7585f,
A: 'a,
B: 'a,
C: 'a,
D: 'a,
E: 'a,
FA,
FB,
FC,
FD,
Marker,
> {
#[document_signature]
#[document_parameters("First.", "Second.", "Third.", "Fourth.")]
#[document_returns("Result context.")]
#[document_examples]
fn dispatch(
self,
fa: FA,
fb: FB,
fc: FC,
fd: FD,
) -> Apply!(<Brand as Kind!( type Of<'a, T: 'a>: 'a; )>::Of<'a, E>);
}
#[document_type_parameters(
"The lifetime.",
"The brand.",
"First.",
"Second.",
"Third.",
"Fourth.",
"Result.",
"Closure."
)]
#[document_parameters("The closure that takes owned values.")]
impl<'a, Brand, A, B, C, D, E, Func>
Lift4Dispatch<
'a,
Brand,
A,
B,
C,
D,
E,
Apply!(<Brand as Kind!( type Of<'a, T: 'a>: 'a; )>::Of<'a, A>),
Apply!(<Brand as Kind!( type Of<'a, T: 'a>: 'a; )>::Of<'a, B>),
Apply!(<Brand as Kind!( type Of<'a, T: 'a>: 'a; )>::Of<'a, C>),
Apply!(<Brand as Kind!( type Of<'a, T: 'a>: 'a; )>::Of<'a, D>),
Val,
> for Func
where
Brand: Lift,
A: Clone + 'a,
B: Clone + 'a,
C: Clone + 'a,
D: Clone + 'a,
E: 'a,
Func: Fn(A, B, C, D) -> E + 'a,
{
#[document_signature]
#[document_parameters("First.", "Second.", "Third.", "Fourth.")]
#[document_returns("Result context.")]
#[document_examples]
fn dispatch(
self,
fa: Apply!(<Brand as Kind!( type Of<'a, T: 'a>: 'a; )>::Of<'a, A>),
fb: Apply!(<Brand as Kind!( type Of<'a, T: 'a>: 'a; )>::Of<'a, B>),
fc: Apply!(<Brand as Kind!( type Of<'a, T: 'a>: 'a; )>::Of<'a, C>),
fd: Apply!(<Brand as Kind!( type Of<'a, T: 'a>: 'a; )>::Of<'a, D>),
) -> Apply!(<Brand as Kind!( type Of<'a, T: 'a>: 'a; )>::Of<'a, E>) {
Brand::lift2(
move |((a, b), c), d| self(a, b, c, d),
Brand::lift2(move |(a, b), c| ((a, b), c), Brand::lift2(|a, b| (a, b), fa, fb), fc),
fd,
)
}
}
#[document_type_parameters(
"The lifetime.",
"The borrow lifetime.",
"The brand.",
"First.",
"Second.",
"Third.",
"Fourth.",
"Result.",
"Closure."
)]
#[document_parameters("The closure that takes references.")]
impl<'a, 'b, Brand, A, B, C, D, E, Func>
Lift4Dispatch<
'a,
Brand,
A,
B,
C,
D,
E,
&'b Apply!(<Brand as Kind!( type Of<'a, T: 'a>: 'a; )>::Of<'a, A>),
&'b Apply!(<Brand as Kind!( type Of<'a, T: 'a>: 'a; )>::Of<'a, B>),
&'b Apply!(<Brand as Kind!( type Of<'a, T: 'a>: 'a; )>::Of<'a, C>),
&'b Apply!(<Brand as Kind!( type Of<'a, T: 'a>: 'a; )>::Of<'a, D>),
Ref,
> for Func
where
Brand: RefLift,
A: Clone + 'a,
B: Clone + 'a,
C: Clone + 'a,
D: 'a,
E: 'a,
Func: Fn(&A, &B, &C, &D) -> E + 'a,
{
#[document_signature]
#[document_parameters("First.", "Second.", "Third.", "Fourth.")]
#[document_returns("Result context.")]
#[document_examples]
fn dispatch(
self,
fa: &'b Apply!(<Brand as Kind!( type Of<'a, T: 'a>: 'a; )>::Of<'a, A>),
fb: &'b Apply!(<Brand as Kind!( type Of<'a, T: 'a>: 'a; )>::Of<'a, B>),
fc: &'b Apply!(<Brand as Kind!( type Of<'a, T: 'a>: 'a; )>::Of<'a, C>),
fd: &'b Apply!(<Brand as Kind!( type Of<'a, T: 'a>: 'a; )>::Of<'a, D>),
) -> Apply!(<Brand as Kind!( type Of<'a, T: 'a>: 'a; )>::Of<'a, E>) {
Brand::ref_lift2(
move |((a, b), c): &((A, B), C), d: &D| self(a, b, c, d),
&Brand::ref_lift2(
move |(a, b): &(A, B), c: &C| ((a.clone(), b.clone()), c.clone()),
&Brand::ref_lift2(|a: &A, b: &B| (a.clone(), b.clone()), fa, fb),
fc,
),
fd,
)
}
}
#[document_type_parameters(
"The lifetime.",
"The brand.",
"1st.",
"2nd.",
"3rd.",
"4th.",
"5th.",
"Result.",
"The first container type (owned or borrowed), inferred from the argument.",
"The second container type (owned or borrowed), inferred from the argument.",
"The third container type (owned or borrowed), inferred from the argument.",
"The fourth container type (owned or borrowed), inferred from the argument.",
"The fifth container type (owned or borrowed), inferred from the argument.",
"Dispatch marker."
)]
#[document_parameters("The closure implementing this dispatch.")]
pub trait Lift5Dispatch<
'a,
Brand: Kind_cdc7cd43dac7585f,
A: 'a,
B: 'a,
C: 'a,
D: 'a,
E: 'a,
G: 'a,
FA,
FB,
FC,
FD,
FE,
Marker,
> {
#[document_signature]
#[document_parameters("1st.", "2nd.", "3rd.", "4th.", "5th.")]
#[document_returns("Result context.")]
#[document_examples]
fn dispatch(
self,
fa: FA,
fb: FB,
fc: FC,
fd: FD,
fe: FE,
) -> Apply!(<Brand as Kind!( type Of<'a, T: 'a>: 'a; )>::Of<'a, G>);
}
#[document_type_parameters(
"The lifetime.",
"The brand.",
"1st.",
"2nd.",
"3rd.",
"4th.",
"5th.",
"Result.",
"Closure."
)]
#[document_parameters("The closure that takes owned values.")]
impl<'a, Brand, A, B, C, D, E, G, Func>
Lift5Dispatch<
'a,
Brand,
A,
B,
C,
D,
E,
G,
Apply!(<Brand as Kind!( type Of<'a, T: 'a>: 'a; )>::Of<'a, A>),
Apply!(<Brand as Kind!( type Of<'a, T: 'a>: 'a; )>::Of<'a, B>),
Apply!(<Brand as Kind!( type Of<'a, T: 'a>: 'a; )>::Of<'a, C>),
Apply!(<Brand as Kind!( type Of<'a, T: 'a>: 'a; )>::Of<'a, D>),
Apply!(<Brand as Kind!( type Of<'a, T: 'a>: 'a; )>::Of<'a, E>),
Val,
> for Func
where
Brand: Lift,
A: Clone + 'a,
B: Clone + 'a,
C: Clone + 'a,
D: Clone + 'a,
E: Clone + 'a,
G: 'a,
Func: Fn(A, B, C, D, E) -> G + 'a,
{
#[document_signature]
#[document_parameters("1st.", "2nd.", "3rd.", "4th.", "5th.")]
#[document_returns("Result context.")]
#[document_examples]
fn dispatch(
self,
fa: Apply!(<Brand as Kind!( type Of<'a, T: 'a>: 'a; )>::Of<'a, A>),
fb: Apply!(<Brand as Kind!( type Of<'a, T: 'a>: 'a; )>::Of<'a, B>),
fc: Apply!(<Brand as Kind!( type Of<'a, T: 'a>: 'a; )>::Of<'a, C>),
fd: Apply!(<Brand as Kind!( type Of<'a, T: 'a>: 'a; )>::Of<'a, D>),
fe: Apply!(<Brand as Kind!( type Of<'a, T: 'a>: 'a; )>::Of<'a, E>),
) -> Apply!(<Brand as Kind!( type Of<'a, T: 'a>: 'a; )>::Of<'a, G>) {
Brand::lift2(
move |(((a, b), c), d), e| self(a, b, c, d, e),
Brand::lift2(
move |((a, b), c), d| (((a, b), c), d),
Brand::lift2(
move |(a, b), c| ((a, b), c),
Brand::lift2(|a, b| (a, b), fa, fb),
fc,
),
fd,
),
fe,
)
}
}
#[document_type_parameters(
"The lifetime.",
"The borrow lifetime.",
"The brand.",
"1st.",
"2nd.",
"3rd.",
"4th.",
"5th.",
"Result.",
"Closure."
)]
#[document_parameters("The closure that takes references.")]
impl<'a, 'b, Brand, A, B, C, D, E, G, Func>
Lift5Dispatch<
'a,
Brand,
A,
B,
C,
D,
E,
G,
&'b Apply!(<Brand as Kind!( type Of<'a, T: 'a>: 'a; )>::Of<'a, A>),
&'b Apply!(<Brand as Kind!( type Of<'a, T: 'a>: 'a; )>::Of<'a, B>),
&'b Apply!(<Brand as Kind!( type Of<'a, T: 'a>: 'a; )>::Of<'a, C>),
&'b Apply!(<Brand as Kind!( type Of<'a, T: 'a>: 'a; )>::Of<'a, D>),
&'b Apply!(<Brand as Kind!( type Of<'a, T: 'a>: 'a; )>::Of<'a, E>),
Ref,
> for Func
where
Brand: RefLift,
A: Clone + 'a,
B: Clone + 'a,
C: Clone + 'a,
D: Clone + 'a,
E: 'a,
G: 'a,
Func: Fn(&A, &B, &C, &D, &E) -> G + 'a,
{
#[document_signature]
#[document_parameters("1st.", "2nd.", "3rd.", "4th.", "5th.")]
#[document_returns("Result context.")]
#[document_examples]
fn dispatch(
self,
fa: &'b Apply!(<Brand as Kind!( type Of<'a, T: 'a>: 'a; )>::Of<'a, A>),
fb: &'b Apply!(<Brand as Kind!( type Of<'a, T: 'a>: 'a; )>::Of<'a, B>),
fc: &'b Apply!(<Brand as Kind!( type Of<'a, T: 'a>: 'a; )>::Of<'a, C>),
fd: &'b Apply!(<Brand as Kind!( type Of<'a, T: 'a>: 'a; )>::Of<'a, D>),
fe: &'b Apply!(<Brand as Kind!( type Of<'a, T: 'a>: 'a; )>::Of<'a, E>),
) -> Apply!(<Brand as Kind!( type Of<'a, T: 'a>: 'a; )>::Of<'a, G>) {
Brand::ref_lift2(
move |(((a, b), c), d): &(((A, B), C), D), e: &E| self(a, b, c, d, e),
&Brand::ref_lift2(
move |((a, b), c): &((A, B), C), d: &D| {
(((a.clone(), b.clone()), c.clone()), d.clone())
},
&Brand::ref_lift2(
move |(a, b): &(A, B), c: &C| ((a.clone(), b.clone()), c.clone()),
&Brand::ref_lift2(|a: &A, b: &B| (a.clone(), b.clone()), fa, fb),
fc,
),
fd,
),
fe,
)
}
}
#[document_signature]
#[document_type_parameters(
"The lifetime of the values.",
"The first container type. Brand is inferred from this.",
"The second container type.",
"The type of the first value.",
"The type of the second value.",
"The type of the result.",
"The brand, inferred via InferableBrand from FA and the closure's input type."
)]
#[document_parameters(
"The function to lift.",
"The first context (owned or borrowed).",
"The second context (owned or borrowed)."
)]
#[document_returns("A new context containing the result of applying the function.")]
#[document_examples]
pub fn lift2<'a, FA, FB, A: 'a, B: 'a, C: 'a, Brand>(
f: impl Lift2Dispatch<
'a,
Brand,
A,
B,
C,
FA,
FB,
<FA as InferableBrand_cdc7cd43dac7585f<'a, Brand, A>>::Marker,
>,
fa: FA,
fb: FB,
) -> Apply!(<Brand as Kind!( type Of<'a, T: 'a>: 'a; )>::Of<'a, C>)
where
Brand: Kind_cdc7cd43dac7585f,
FA: InferableBrand_cdc7cd43dac7585f<'a, Brand, A>, {
f.dispatch(fa, fb)
}
#[document_signature]
#[document_type_parameters(
"The lifetime of the values.",
"The first container type. Brand is inferred from this.",
"The second container type.",
"The third container type.",
"The type of the first value.",
"The type of the second value.",
"The type of the third value.",
"The type of the result.",
"The brand, inferred via InferableBrand from FA and the closure's input type."
)]
#[document_parameters(
"The function to lift.",
"First context (owned or borrowed).",
"Second context (owned or borrowed).",
"Third context (owned or borrowed)."
)]
#[document_returns("A new context containing the result.")]
#[document_examples]
pub fn lift3<'a, FA, FB, FC, A: 'a, B: 'a, C: 'a, D: 'a, Brand>(
f: impl Lift3Dispatch<
'a,
Brand,
A,
B,
C,
D,
FA,
FB,
FC,
<FA as InferableBrand_cdc7cd43dac7585f<'a, Brand, A>>::Marker,
>,
fa: FA,
fb: FB,
fc: FC,
) -> Apply!(<Brand as Kind!( type Of<'a, T: 'a>: 'a; )>::Of<'a, D>)
where
Brand: Kind_cdc7cd43dac7585f,
FA: InferableBrand_cdc7cd43dac7585f<'a, Brand, A>, {
f.dispatch(fa, fb, fc)
}
#[document_signature]
#[document_type_parameters(
"The lifetime of the values.",
"The first container type. Brand is inferred from this.",
"The second container type.",
"The third container type.",
"The fourth container type.",
"The type of the first value.",
"The type of the second value.",
"The type of the third value.",
"The type of the fourth value.",
"The type of the result.",
"The brand, inferred via InferableBrand from FA and the closure's input type."
)]
#[document_parameters(
"The function to lift.",
"First context (owned or borrowed).",
"Second context (owned or borrowed).",
"Third context (owned or borrowed).",
"Fourth context (owned or borrowed)."
)]
#[document_returns("A new context containing the result.")]
#[document_examples]
pub fn lift4<'a, FA, FB, FC, FD, A: 'a, B: 'a, C: 'a, D: 'a, E: 'a, Brand>(
f: impl Lift4Dispatch<
'a,
Brand,
A,
B,
C,
D,
E,
FA,
FB,
FC,
FD,
<FA as InferableBrand_cdc7cd43dac7585f<'a, Brand, A>>::Marker,
>,
fa: FA,
fb: FB,
fc: FC,
fd: FD,
) -> Apply!(<Brand as Kind!( type Of<'a, T: 'a>: 'a; )>::Of<'a, E>)
where
Brand: Kind_cdc7cd43dac7585f,
FA: InferableBrand_cdc7cd43dac7585f<'a, Brand, A>, {
f.dispatch(fa, fb, fc, fd)
}
#[document_signature]
#[document_type_parameters(
"The lifetime of the values.",
"The first container type. Brand is inferred from this.",
"The second container type.",
"The third container type.",
"The fourth container type.",
"The fifth container type.",
"The type of the first value.",
"The type of the second value.",
"The type of the third value.",
"The type of the fourth value.",
"The type of the fifth value.",
"The type of the result.",
"The brand, inferred via InferableBrand from FA and the closure's input type."
)]
#[document_parameters(
"The function to lift.",
"1st context (owned or borrowed).",
"2nd context (owned or borrowed).",
"3rd context (owned or borrowed).",
"4th context (owned or borrowed).",
"5th context (owned or borrowed)."
)]
#[document_returns("A new context containing the result.")]
#[document_examples]
pub fn lift5<'a, FA, FB, FC, FD, FE, A: 'a, B: 'a, C: 'a, D: 'a, E: 'a, G: 'a, Brand>(
f: impl Lift5Dispatch<
'a,
Brand,
A,
B,
C,
D,
E,
G,
FA,
FB,
FC,
FD,
FE,
<FA as InferableBrand_cdc7cd43dac7585f<'a, Brand, A>>::Marker,
>,
fa: FA,
fb: FB,
fc: FC,
fd: FD,
fe: FE,
) -> Apply!(<Brand as Kind!( type Of<'a, T: 'a>: 'a; )>::Of<'a, G>)
where
Brand: Kind_cdc7cd43dac7585f,
FA: InferableBrand_cdc7cd43dac7585f<'a, Brand, A>, {
f.dispatch(fa, fb, fc, fd, fe)
}
pub mod explicit {
use super::*;
#[document_signature]
#[document_type_parameters(
"The lifetime of the values.",
"The brand of the context.",
"The type of the first value.",
"The type of the second value.",
"The type of the result.",
"The first container type (owned or borrowed), inferred from the argument.",
"The second container type (owned or borrowed), inferred from the argument.",
"Dispatch marker type, inferred automatically."
)]
#[document_parameters(
"The function to lift.",
"The first context (owned for Val, borrowed for Ref).",
"The second context (owned for Val, borrowed for Ref)."
)]
#[document_returns("A new context containing the result of applying the function.")]
#[document_examples]
pub fn lift2<'a, Brand: Kind_cdc7cd43dac7585f, A: 'a, B: 'a, C: 'a, FA, FB, Marker>(
f: impl Lift2Dispatch<'a, Brand, A, B, C, FA, FB, Marker>,
fa: FA,
fb: FB,
) -> Apply!(<Brand as Kind!( type Of<'a, T: 'a>: 'a; )>::Of<'a, C>) {
f.dispatch(fa, fb)
}
#[document_signature]
#[document_type_parameters(
"The lifetime.",
"The brand.",
"First type.",
"Second type.",
"Third type.",
"Result type.",
"The first container type (owned or borrowed), inferred from the argument.",
"The second container type (owned or borrowed), inferred from the argument.",
"The third container type (owned or borrowed), inferred from the argument.",
"Dispatch marker."
)]
#[document_parameters(
"The function to lift.",
"First context (owned for Val, borrowed for Ref).",
"Second context (owned for Val, borrowed for Ref).",
"Third context (owned for Val, borrowed for Ref)."
)]
#[document_returns("A new context containing the result.")]
#[document_examples]
pub fn lift3<
'a,
Brand: Kind_cdc7cd43dac7585f,
A: 'a,
B: 'a,
C: 'a,
D: 'a,
FA,
FB,
FC,
Marker,
>(
f: impl Lift3Dispatch<'a, Brand, A, B, C, D, FA, FB, FC, Marker>,
fa: FA,
fb: FB,
fc: FC,
) -> Apply!(<Brand as Kind!( type Of<'a, T: 'a>: 'a; )>::Of<'a, D>) {
f.dispatch(fa, fb, fc)
}
#[document_signature]
#[document_type_parameters(
"The lifetime.",
"The brand.",
"First.",
"Second.",
"Third.",
"Fourth.",
"Result.",
"The first container type (owned or borrowed), inferred from the argument.",
"The second container type (owned or borrowed), inferred from the argument.",
"The third container type (owned or borrowed), inferred from the argument.",
"The fourth container type (owned or borrowed), inferred from the argument.",
"Dispatch marker."
)]
#[document_parameters(
"The function to lift.",
"First (owned for Val, borrowed for Ref).",
"Second (owned for Val, borrowed for Ref).",
"Third (owned for Val, borrowed for Ref).",
"Fourth (owned for Val, borrowed for Ref)."
)]
#[document_returns("Result context.")]
#[document_examples]
pub fn lift4<
'a,
Brand: Kind_cdc7cd43dac7585f,
A: 'a,
B: 'a,
C: 'a,
D: 'a,
E: 'a,
FA,
FB,
FC,
FD,
Marker,
>(
f: impl Lift4Dispatch<'a, Brand, A, B, C, D, E, FA, FB, FC, FD, Marker>,
fa: FA,
fb: FB,
fc: FC,
fd: FD,
) -> Apply!(<Brand as Kind!( type Of<'a, T: 'a>: 'a; )>::Of<'a, E>) {
f.dispatch(fa, fb, fc, fd)
}
#[document_signature]
#[document_type_parameters(
"The lifetime.",
"The brand.",
"1st.",
"2nd.",
"3rd.",
"4th.",
"5th.",
"Result.",
"The first container type (owned or borrowed), inferred from the argument.",
"The second container type (owned or borrowed), inferred from the argument.",
"The third container type (owned or borrowed), inferred from the argument.",
"The fourth container type (owned or borrowed), inferred from the argument.",
"The fifth container type (owned or borrowed), inferred from the argument.",
"Dispatch marker."
)]
#[document_parameters(
"The function to lift.",
"1st (owned for Val, borrowed for Ref).",
"2nd (owned for Val, borrowed for Ref).",
"3rd (owned for Val, borrowed for Ref).",
"4th (owned for Val, borrowed for Ref).",
"5th (owned for Val, borrowed for Ref)."
)]
#[document_returns("Result context.")]
#[document_examples]
pub fn lift5<
'a,
Brand: Kind_cdc7cd43dac7585f,
A: 'a,
B: 'a,
C: 'a,
D: 'a,
E: 'a,
G: 'a,
FA,
FB,
FC,
FD,
FE,
Marker,
>(
f: impl Lift5Dispatch<'a, Brand, A, B, C, D, E, G, FA, FB, FC, FD, FE, Marker>,
fa: FA,
fb: FB,
fc: FC,
fd: FD,
fe: FE,
) -> Apply!(<Brand as Kind!( type Of<'a, T: 'a>: 'a; )>::Of<'a, G>) {
f.dispatch(fa, fb, fc, fd, fe)
}
}
}
pub use inner::*;