Struct tfhe::shortint::parameters::MessageModulus
source · pub struct MessageModulus(pub usize);
Available on crate feature
shortint
only.Expand description
The modulus of the message space. For a given plaintext $p$ we have the message $m$ defined as $m = p\bmod{MessageModulus}$ and so $0 <= m < MessageModulus$.
§Note
The total plaintext modulus is given by $MessageModulus \times CarryModulus$
Tuple Fields§
§0: usize
Trait Implementations§
source§impl Clone for MessageModulus
impl Clone for MessageModulus
source§fn clone(&self) -> MessageModulus
fn clone(&self) -> MessageModulus
Returns a copy 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 MessageModulus
impl Debug for MessageModulus
source§impl<'de> Deserialize<'de> for MessageModulus
impl<'de> Deserialize<'de> for MessageModulus
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 MessageModulus
impl PartialEq for MessageModulus
source§fn eq(&self, other: &MessageModulus) -> bool
fn eq(&self, other: &MessageModulus) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for MessageModulus
impl Serialize for MessageModulus
impl Copy for MessageModulus
impl Eq for MessageModulus
impl StructuralPartialEq for MessageModulus
Auto Trait Implementations§
impl Freeze for MessageModulus
impl RefUnwindSafe for MessageModulus
impl Send for MessageModulus
impl Sync for MessageModulus
impl Unpin for MessageModulus
impl UnwindSafe for MessageModulus
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