allocative/impls/std/
function.rs1use crate::allocative_trait::Allocative;
11use crate::visitor::Visitor;
12
13impl<R> Allocative for fn() -> R {
14 fn visit<'a, 'b: 'a>(&self, visitor: &'a mut Visitor<'b>) {
15 visitor.visit_simple_sized::<Self>();
16 }
17}
18
19impl<R, A> Allocative for fn(A) -> R {
20 fn visit<'a, 'b: 'a>(&self, visitor: &'a mut Visitor<'b>) {
21 visitor.visit_simple_sized::<Self>();
22 }
23}
24impl<R, A, B> Allocative for fn(A, B) -> R {
25 fn visit<'a, 'b: 'a>(&self, visitor: &'a mut Visitor<'b>) {
26 visitor.visit_simple_sized::<Self>();
27 }
28}
29impl<R, A, B, C> Allocative for fn(A, B, C) -> R {
30 fn visit<'a, 'b: 'a>(&self, visitor: &'a mut Visitor<'b>) {
31 visitor.visit_simple_sized::<Self>();
32 }
33}
34
35impl<R, A, B, C, D> Allocative for fn(A, B, C, D) -> R {
36 fn visit<'a, 'b: 'a>(&self, visitor: &'a mut Visitor<'b>) {
37 visitor.visit_simple_sized::<Self>();
38 }
39}
40
41impl<R, A, B, C, D, E> Allocative for fn(A, B, C, D, E) -> R {
42 fn visit<'a, 'b: 'a>(&self, visitor: &'a mut Visitor<'b>) {
43 visitor.visit_simple_sized::<Self>();
44 }
45}