object_rainbow/impls/
tuple1.rs

1use crate::*;
2
3impl<T: ToOutput> ToOutput for (T,) {
4    fn to_output(&self, output: &mut dyn Output) {
5        self.0.to_output(output);
6    }
7}
8
9impl<T: Topological> Topological for (T,) {
10    fn accept_points(&self, visitor: &mut impl PointVisitor) {
11        self.0.accept_points(visitor);
12    }
13}
14
15impl<T: Parse<I>, I: ParseInput> Parse<I> for (T,) {
16    fn parse(input: I) -> crate::Result<Self> {
17        Ok((input.parse()?,))
18    }
19}
20
21impl<T: ParseInline<I>, I: ParseInput> ParseInline<I> for (T,) {
22    fn parse_inline(input: &mut I) -> crate::Result<Self> {
23        Ok((input.parse_inline()?,))
24    }
25}
26
27impl<T: Tagged> Tagged for (T,) {
28    const TAGS: Tags = T::TAGS;
29}
30
31impl<T: Object> Object for (T,) {}
32
33impl<T: Inline> Inline for (T,) {}
34
35impl<T: ReflessObject> ReflessObject for (T,) {}
36
37impl<T: ReflessInline> ReflessInline for (T,) {}
38
39impl<T: Size> Size for (T,) {
40    const SIZE: usize = T::SIZE;
41    type Size = T::Size;
42}
43
44impl<T: MaybeHasNiche> MaybeHasNiche for (T,) {
45    type MnArray = T::MnArray;
46}
47
48impl<T> Equivalent<T> for (T,) {
49    fn into_equivalent(self) -> T {
50        self.0
51    }
52
53    fn from_equivalent(object: T) -> Self {
54        (object,)
55    }
56}