cel_cxx/values/impls/
int.rs

1use super::{impl_from, impl_into, impl_typed};
2use crate::{types::*, values::*};
3
4impl_typed!(
5    Int: Value, MapKey {
6        i64,
7        i32,
8        i16,
9        isize
10    }
11);
12
13impl_into!(
14    Int: Value, MapKey, Constant {
15        i64 => |self| self,
16        i32 => |self| self as i64,
17        i16 => |self| self as i64,
18        isize => |self| self as i64,
19    }
20);
21
22impl_from!(
23    Int: Value, MapKey {
24        i64 => |v| *v,
25        &i64 as &'a i64 => |v| v,
26        i32 => |v| *v as i32,
27        i16 => |v| *v as i16,
28        isize => |v| *v as isize,
29    }
30);