bel/common/types/int.rs
1use std::any::Any;
2
3use crate::common::{types::Type, value::Val};
4
5pub struct Int(i64);
6
7impl Val for Int {
8 fn get_type(&self) -> Type<'_> {
9 super::INT_TYPE
10 }
11
12 fn into_inner(self) -> Box<dyn Any> {
13 Box::new(self.0)
14 }
15}
16
17impl From<Int> for i64 {
18 fn from(value: Int) -> Self {
19 value.0
20 }
21}
22
23impl From<i64> for Int {
24 fn from(value: i64) -> Self {
25 Self(value)
26 }
27}