arcis 0.14.1

A standard library of types and functions for writing MPC circuits with the Arcis framework.
Documentation
//! Constructors and methods on [`Box`] accepted by the arcis interpreter.
//!
//! [`Box`] here is a documentation-only redefinition of
//! [`std::boxed::Box`] — same shape, but with bodies that panic, since the
//! arcis interpreter intercepts the real method before they run.

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

/// Documentation of constructors and methods on [`Box<T>`](std::boxed::Box)
/// accepted by the arcis interpreter. Mirrors [`std::boxed::Box`]'s shape.
#[derive(Debug, Clone, Default, PartialEq, Eq)]
pub struct Box<T: ?Sized> {
    _phantom: ::core::marker::PhantomData<T>,
}

impl<T> Box<T> {
    /// Allocates memory and places `x` into it.
    pub fn new(x: T) -> Box<T> {
        unimplemented!("{STUB_MSG}")
    }

    /// Consumes and leaks the `Box`, returning a `'static mut` reference to its contents.
    pub fn leak(self) -> &'static mut T {
        unimplemented!("{STUB_MSG}")
    }
}