pub struct BinaryCircuit { /* private fields */ }Expand description
Static representation of binary computation supported by fancy garbling.
Implementations§
Source§impl BinaryCircuit
impl BinaryCircuit
Sourcepub fn new(ngates: Option<usize>) -> Self
pub fn new(ngates: Option<usize>) -> Self
Construct a new empty BinaryCircuit, allocating ngates of space to
store gates if provided.
Source§impl BinaryCircuit
impl BinaryCircuit
Sourcepub fn parse(reader: impl BufRead) -> Result<Self>
pub fn parse(reader: impl BufRead) -> Result<Self>
Generates a new Circuit from file filename. The file must follow the
format given here: https://homes.esat.kuleuven.be/~nsmart/MPC/old-circuits.html,
(Bristol Format—the OLD format—not Bristol Fashion—the NEW format) otherwise
a CircuitParserError is returned.
Trait Implementations§
Source§impl<F: FancyBinary> CircuitExecutor<F> for BinaryCircuit
impl<F: FancyBinary> CircuitExecutor<F> for BinaryCircuit
Source§impl Clone for BinaryCircuit
impl Clone for BinaryCircuit
Source§fn clone(&self) -> BinaryCircuit
fn clone(&self) -> BinaryCircuit
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for BinaryCircuit
impl Debug for BinaryCircuit
Source§impl<'de> Deserialize<'de> for BinaryCircuit
impl<'de> Deserialize<'de> for BinaryCircuit
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for BinaryCircuit
impl PartialEq for BinaryCircuit
Source§impl Serialize for BinaryCircuit
impl Serialize for BinaryCircuit
impl StructuralPartialEq for BinaryCircuit
Auto Trait Implementations§
impl Freeze for BinaryCircuit
impl RefUnwindSafe for BinaryCircuit
impl Send for BinaryCircuit
impl Sync for BinaryCircuit
impl Unpin for BinaryCircuit
impl UnsafeUnpin for BinaryCircuit
impl UnwindSafe for BinaryCircuit
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<C> CircuitInfo for C
impl<C> CircuitInfo for C
Source§fn print_info(&self) -> Result<(), Error>
fn print_info(&self) -> Result<(), Error>
Print circuit info
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> IsSameType<T> for T
impl<T> IsSameType<T> for T
§type EqualityProposition = TrueEqualityProposition
type EqualityProposition = TrueEqualityProposition
The [
EqualityProposition] that Self == T