rune/modules/
i64.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
//! Integers.

use core::cmp::Ordering;
use core::num::ParseIntError;

use crate as rune;
use crate::alloc;
use crate::alloc::string::TryToString;
use crate::runtime::{VmErrorKind, VmResult};
use crate::{ContextError, Module};

/// Signed integers.
///
/// This provides methods for computing over and parsing 64-bit signed integers.
#[rune::module(::std::i64)]
pub fn module() -> Result<Module, ContextError> {
    let mut m = Module::from_meta(self::module_meta)?;
    signed!(m, i64);
    Ok(m)
}

signed_fns!(i64);