arcium-core-utils 0.8.0

Arcium core utils
Documentation
use crate::{
    circuit::{
        latest::errors::CircuitError,
        old::v1::ops::{FieldPlaintextBinaryOp, FieldPlaintextUnaryOp},
    },
    config::MpcConfig,
};

#[derive(Debug, Clone, PartialEq, Eq, thiserror::Error)]
pub enum OpsConversionError {
    #[error("Cannot transform FieldPlaintextUnaryOp {0:?} into BitPlaintextUnaryOp")]
    PlaintextUnaryOpFieldToBit(FieldPlaintextUnaryOp),
    #[error("Cannot transform FieldPlaintextBinaryOp {0:?} into BitPlaintextBinaryOp")]
    PlaintextBinaryOpFieldToBit(FieldPlaintextBinaryOp),
}

#[derive(Debug, Clone, PartialEq, Eq, thiserror::Error)]
pub enum ConversionError<C: MpcConfig> {
    #[error("{0}")]
    OpsConversionError(#[from] OpsConversionError),
    #[error("{0}")]
    CircuitError(#[from] CircuitError<C>),
    #[error("Deserialization error: {0}")]
    Deserialization(String),
}