Struct tfhe::CompactPublicKey
source · pub struct CompactPublicKey { /* private fields */ }
Available on crate feature
integer
only.Expand description
A more compact public key
Compared to the PublicKey, this one is much smaller however it supports less parameters.
Implementations§
source§impl CompactPublicKey
impl CompactPublicKey
sourcepub fn new(client_key: &ClientKey) -> Self
pub fn new(client_key: &ClientKey) -> Self
Creates a CompactPublicKey, derived from the given client key
§Panic
This will panic if parameters are not compatible
pub fn try_new(client_key: &ClientKey) -> Option<Self>
pub fn into_raw_parts(self) -> CompactPublicKey
pub fn from_raw_parts(key: CompactPublicKey) -> Self
Trait Implementations§
source§impl Clone for CompactPublicKey
impl Clone for CompactPublicKey
source§fn clone(&self) -> CompactPublicKey
fn clone(&self) -> CompactPublicKey
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 CompactPublicKey
impl Debug for CompactPublicKey
source§impl<'de> Deserialize<'de> for CompactPublicKey
impl<'de> Deserialize<'de> for CompactPublicKey
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<'a, Id, T> FheTryEncrypt<&'a [T], CompactPublicKey> for CompactFheIntList<Id>where
T: DecomposableInto<u64>,
Id: FheIntId,
impl<'a, Id, T> FheTryEncrypt<&'a [T], CompactPublicKey> for CompactFheIntList<Id>where
T: DecomposableInto<u64>,
Id: FheIntId,
type Error = Error
fn try_encrypt( values: &'a [T], key: &CompactPublicKey ) -> Result<Self, Self::Error>
source§impl<'a, Id, T> FheTryEncrypt<&'a [T], CompactPublicKey> for CompactFheUintList<Id>where
T: DecomposableInto<u64>,
Id: FheUintId,
impl<'a, Id, T> FheTryEncrypt<&'a [T], CompactPublicKey> for CompactFheUintList<Id>where
T: DecomposableInto<u64>,
Id: FheUintId,
type Error = Error
fn try_encrypt( values: &'a [T], key: &CompactPublicKey ) -> Result<Self, Self::Error>
source§impl<'a> FheTryEncrypt<&'a [bool], CompactPublicKey> for CompactFheBoolList
impl<'a> FheTryEncrypt<&'a [bool], CompactPublicKey> for CompactFheBoolList
source§fn try_encrypt(
values: &'a [bool],
key: &CompactPublicKey
) -> Result<Self, Self::Error>
fn try_encrypt( values: &'a [bool], key: &CompactPublicKey ) -> Result<Self, Self::Error>
Encrypts a slice of bool
See CompactFheBoolList example.
type Error = Error
source§impl<Id, T> FheTryEncrypt<T, CompactPublicKey> for CompactFheInt<Id>where
T: DecomposableInto<u64>,
Id: FheIntId,
impl<Id, T> FheTryEncrypt<T, CompactPublicKey> for CompactFheInt<Id>where
T: DecomposableInto<u64>,
Id: FheIntId,
type Error = Error
fn try_encrypt(value: T, key: &CompactPublicKey) -> Result<Self, Self::Error>
source§impl<Id, T> FheTryEncrypt<T, CompactPublicKey> for CompactFheUint<Id>where
T: DecomposableInto<u64>,
Id: FheUintId,
impl<Id, T> FheTryEncrypt<T, CompactPublicKey> for CompactFheUint<Id>where
T: DecomposableInto<u64>,
Id: FheUintId,
type Error = Error
fn try_encrypt(value: T, key: &CompactPublicKey) -> Result<Self, Self::Error>
source§impl<Id, T> FheTryEncrypt<T, CompactPublicKey> for FheInt<Id>
impl<Id, T> FheTryEncrypt<T, CompactPublicKey> for FheInt<Id>
type Error = Error
fn try_encrypt(value: T, key: &CompactPublicKey) -> Result<Self, Self::Error>
source§impl<Id, T> FheTryEncrypt<T, CompactPublicKey> for FheUint<Id>
impl<Id, T> FheTryEncrypt<T, CompactPublicKey> for FheUint<Id>
type Error = Error
fn try_encrypt(value: T, key: &CompactPublicKey) -> Result<Self, Self::Error>
source§impl FheTryEncrypt<bool, CompactPublicKey> for CompactFheBool
impl FheTryEncrypt<bool, CompactPublicKey> for CompactFheBool
type Error = Error
fn try_encrypt(value: bool, key: &CompactPublicKey) -> Result<Self, Self::Error>
source§impl FheTryEncrypt<bool, CompactPublicKey> for FheBool
impl FheTryEncrypt<bool, CompactPublicKey> for FheBool
type Error = Error
fn try_encrypt(value: bool, key: &CompactPublicKey) -> Result<Self, Self::Error>
Auto Trait Implementations§
impl Freeze for CompactPublicKey
impl RefUnwindSafe for CompactPublicKey
impl Send for CompactPublicKey
impl Sync for CompactPublicKey
impl Unpin for CompactPublicKey
impl UnwindSafe for CompactPublicKey
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