pub trait FheTryEncrypt<T, Key>where
Self: Sized,{
type Error: Error;
// Required method
fn try_encrypt(value: T, key: &Key) -> Result<Self, Self::Error>;
}
Available on crate feature
integer
only.Expand description
Trait used to have a generic fallible way of creating a value of a FHE type.
For example this trait may be implemented by FHE types which may not be able to represent all the values of even the smallest native type.
For example, FheUint2
which has 2 bits of precision may not be constructed from
all values that a u8
can hold.
Required Associated Types§
Required Methods§
fn try_encrypt(value: T, key: &Key) -> Result<Self, Self::Error>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
Implementors§
Source§impl FheTryEncrypt<&str, ClientKey> for FheAsciiString
Available on crate feature strings
only.
impl FheTryEncrypt<&str, ClientKey> for FheAsciiString
Available on crate feature
strings
only.Source§impl FheTryEncrypt<&String, ClientKey> for FheAsciiString
Available on crate feature strings
only.
impl FheTryEncrypt<&String, ClientKey> for FheAsciiString
Available on crate feature
strings
only.Source§impl FheTryEncrypt<&[bool], ClientKey> for GpuFheBoolArray
Available on crate feature gpu
only.
impl FheTryEncrypt<&[bool], ClientKey> for GpuFheBoolArray
Available on crate feature
gpu
only.Source§impl FheTryEncrypt<&[bool], ClientKey> for CpuFheBoolArray
impl FheTryEncrypt<&[bool], ClientKey> for CpuFheBoolArray
Source§impl FheTryEncrypt<bool, ClientKey> for CompressedFheBool
impl FheTryEncrypt<bool, ClientKey> for CompressedFheBool
Source§impl FheTryEncrypt<bool, CompressedPublicKey> for FheBool
impl FheTryEncrypt<bool, CompressedPublicKey> for FheBool
Source§impl<'a> FheTryEncrypt<&'a [bool], ClientKey> for FheBoolArray
impl<'a> FheTryEncrypt<&'a [bool], ClientKey> for FheBoolArray
Source§impl<'a> FheTryEncrypt<EncryptableString<'a>, ClientKey> for FheAsciiString
Available on crate feature strings
only.
impl<'a> FheTryEncrypt<EncryptableString<'a>, ClientKey> for FheAsciiString
Available on crate feature
strings
only.Source§impl<'a, Clear, Id> FheTryEncrypt<&'a [Clear], ClientKey> for FheArrayBase<Vec<RadixCiphertext>, Id>
impl<'a, Clear, Id> FheTryEncrypt<&'a [Clear], ClientKey> for FheArrayBase<Vec<RadixCiphertext>, Id>
Source§impl<'a, Clear, Id> FheTryEncrypt<&'a [Clear], ClientKey> for FheArrayBase<GpuOwned<CudaUnsignedRadixCiphertext>, Id>
Available on crate feature gpu
only.
impl<'a, Clear, Id> FheTryEncrypt<&'a [Clear], ClientKey> for FheArrayBase<GpuOwned<CudaUnsignedRadixCiphertext>, Id>
Available on crate feature
gpu
only.Source§impl<'a, Clear, Id> FheTryEncrypt<&'a [Clear], ClientKey> for FheArrayBase<InnerIntArray, Id>
impl<'a, Clear, Id> FheTryEncrypt<&'a [Clear], ClientKey> for FheArrayBase<InnerIntArray, Id>
Source§impl<'a, Clear, Id> FheTryEncrypt<&'a [Clear], ClientKey> for GpuFheIntArray<Id>
Available on crate feature gpu
only.
impl<'a, Clear, Id> FheTryEncrypt<&'a [Clear], ClientKey> for GpuFheIntArray<Id>
Available on crate feature
gpu
only.Source§impl<'a, Clear, Id> FheTryEncrypt<&'a [Clear], ClientKey> for CpuFheIntArray<Id>
impl<'a, Clear, Id> FheTryEncrypt<&'a [Clear], ClientKey> for CpuFheIntArray<Id>
Source§impl<'a, Clear, Id> FheTryEncrypt<&'a [Clear], ClientKey> for FheUintArray<Id>
impl<'a, Clear, Id> FheTryEncrypt<&'a [Clear], ClientKey> for FheUintArray<Id>
Source§impl<'a, Clear, Id> FheTryEncrypt<(&'a [Clear], Vec<usize>), ClientKey> for FheArrayBase<Vec<RadixCiphertext>, Id>
impl<'a, Clear, Id> FheTryEncrypt<(&'a [Clear], Vec<usize>), ClientKey> for FheArrayBase<Vec<RadixCiphertext>, Id>
Source§impl<'a, Clear, Id> FheTryEncrypt<(&'a [Clear], Vec<usize>), ClientKey> for FheArrayBase<GpuOwned<CudaUnsignedRadixCiphertext>, Id>
Available on crate feature gpu
only.
impl<'a, Clear, Id> FheTryEncrypt<(&'a [Clear], Vec<usize>), ClientKey> for FheArrayBase<GpuOwned<CudaUnsignedRadixCiphertext>, Id>
Available on crate feature
gpu
only.