oxilean-runtime 0.1.2

OxiLean runtime - Memory management, closures, I/O, and task scheduling
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//! # RtObject - bool_val_group Methods
//!
//! This module contains method implementations for `RtObject`.
//!
//! 🤖 Generated with [SplitRS](https://github.com/cool-japan/splitrs)

use super::functions::TAG_BOOL;
use super::rtobject_type::RtObject;

impl RtObject {
    /// Create a boolean value.
    pub fn bool_val(b: bool) -> Self {
        let payload = if b { 1u64 } else { 0u64 };
        RtObject {
            bits: ((TAG_BOOL as u64) << 56) | payload,
        }
    }
}