#[non_exhaustive]pub enum LweCiphertextVectorGlweCiphertextDiscardingFunctionalPackingKeyswitchError<EngineError: Error> {
InputLweDimensionMismatch,
OutputGlweDimensionMismatch,
OutputPolynomialSizeMismatch,
CiphertextCountMismatch,
Engine(EngineError),
}Expand description
An error used with the LweCiphertextVectorGlweCiphertextDiscardingFunctionalPackingKeyswitchEngine trait.
This type provides a
LweCiphertextVectorGlweCiphertextDiscardingFunctionalPackingKeyswitchError::perform_generic_checks
function that does error checking for the general cases, returning an Ok(())
if the inputs are valid, meaning that engine implementors would then only
need to check for their own specific errors.
Otherwise an Err(..) with the proper error variant is returned.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
InputLweDimensionMismatch
Generic error: The input ciphertext vector and input functional packing keyswitch key LWE dimension must be the same.
OutputGlweDimensionMismatch
Generic error: The output ciphertext vector and functional packing keyswitch key output GLWE dimensions must be the same.
OutputPolynomialSizeMismatch
Generic error: The output ciphertext vector and functional packing keyswitch key polynomial sizes must be the same.
CiphertextCountMismatch
Generic error: The input ciphertext count is bigger than the output polynomial size.
Engine(EngineError)
Specific error to the implementing engine.
Implementations§
Source§impl<EngineError: Error> LweCiphertextVectorGlweCiphertextDiscardingFunctionalPackingKeyswitchError<EngineError>
impl<EngineError: Error> LweCiphertextVectorGlweCiphertextDiscardingFunctionalPackingKeyswitchError<EngineError>
Sourcepub fn perform_generic_checks<FunctionalPackingKeyswitchKey, InputCiphertextVector, OutputCiphertext>(
output: &mut OutputCiphertext,
input: &InputCiphertextVector,
ksk: &FunctionalPackingKeyswitchKey,
) -> Result<(), Self>where
FunctionalPackingKeyswitchKey: FunctionalPackingKeyswitchKeyEntity,
InputCiphertextVector: LweCiphertextVectorEntity<KeyDistribution = FunctionalPackingKeyswitchKey::InputKeyDistribution>,
OutputCiphertext: GlweCiphertextEntity<KeyDistribution = FunctionalPackingKeyswitchKey::OutputKeyDistribution>,
pub fn perform_generic_checks<FunctionalPackingKeyswitchKey, InputCiphertextVector, OutputCiphertext>(
output: &mut OutputCiphertext,
input: &InputCiphertextVector,
ksk: &FunctionalPackingKeyswitchKey,
) -> Result<(), Self>where
FunctionalPackingKeyswitchKey: FunctionalPackingKeyswitchKeyEntity,
InputCiphertextVector: LweCiphertextVectorEntity<KeyDistribution = FunctionalPackingKeyswitchKey::InputKeyDistribution>,
OutputCiphertext: GlweCiphertextEntity<KeyDistribution = FunctionalPackingKeyswitchKey::OutputKeyDistribution>,
Validates the inputs
Trait Implementations§
Source§impl<EngineError: Clone + Error> Clone for LweCiphertextVectorGlweCiphertextDiscardingFunctionalPackingKeyswitchError<EngineError>
impl<EngineError: Clone + Error> Clone for LweCiphertextVectorGlweCiphertextDiscardingFunctionalPackingKeyswitchError<EngineError>
Source§fn clone(
&self,
) -> LweCiphertextVectorGlweCiphertextDiscardingFunctionalPackingKeyswitchError<EngineError>
fn clone( &self, ) -> LweCiphertextVectorGlweCiphertextDiscardingFunctionalPackingKeyswitchError<EngineError>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<EngineError: Debug + Error> Debug for LweCiphertextVectorGlweCiphertextDiscardingFunctionalPackingKeyswitchError<EngineError>
impl<EngineError: Debug + Error> Debug for LweCiphertextVectorGlweCiphertextDiscardingFunctionalPackingKeyswitchError<EngineError>
Source§impl<EngineError: Error> Display for LweCiphertextVectorGlweCiphertextDiscardingFunctionalPackingKeyswitchError<EngineError>
impl<EngineError: Error> Display for LweCiphertextVectorGlweCiphertextDiscardingFunctionalPackingKeyswitchError<EngineError>
Source§impl<EngineError: Error> Error for LweCiphertextVectorGlweCiphertextDiscardingFunctionalPackingKeyswitchError<EngineError>
impl<EngineError: Error> Error for LweCiphertextVectorGlweCiphertextDiscardingFunctionalPackingKeyswitchError<EngineError>
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
Source§impl<EngineError: PartialEq + Error> PartialEq for LweCiphertextVectorGlweCiphertextDiscardingFunctionalPackingKeyswitchError<EngineError>
impl<EngineError: PartialEq + Error> PartialEq for LweCiphertextVectorGlweCiphertextDiscardingFunctionalPackingKeyswitchError<EngineError>
Source§fn eq(
&self,
other: &LweCiphertextVectorGlweCiphertextDiscardingFunctionalPackingKeyswitchError<EngineError>,
) -> bool
fn eq( &self, other: &LweCiphertextVectorGlweCiphertextDiscardingFunctionalPackingKeyswitchError<EngineError>, ) -> bool
self and other values to be equal, and is used by ==.