arcis 0.14.1

A standard library of types and functions for writing MPC circuits with the Arcis framework.
Documentation
//! Methods on [`bool`](::core::primitive::bool) accepted by the arcis interpreter.
//!
//! [`bool`](struct@bool) here is a documentation-only unit struct shadowing the
//! primitive within this module. The associated items mirror what the arcis
//! interpreter accepts inside `#[encrypted]` code.

const STUB_MSG: &str = "arcis::std::boolean is documentation-only; \
    inside `#[encrypted]` code the interpreter intercepts the real method before this stub runs.";

/// Supported items on `bool` inside `#[encrypted]` code.
#[allow(non_camel_case_types)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
pub struct bool;

impl bool {
    /// Returns `Some(f())` if `self` is `true`, otherwise `None`. Mirrors
    /// [`bool::then`](::core::primitive::bool::then).
    pub fn then<T, F: FnOnce() -> T>(self, f: F) -> crate::std::option::Option<T> {
        unimplemented!("{STUB_MSG}")
    }

    /// Returns `Some(t)` if `self` is `true`, otherwise `None`. Mirrors
    /// [`bool::then_some`](::core::primitive::bool::then_some).
    pub fn then_some<T>(self, t: T) -> crate::std::option::Option<T> {
        unimplemented!("{STUB_MSG}")
    }
}