#[non_exhaustive]
pub enum GgswCiphertextDiscardingConversionError<EngineError: Error> {
GlweDimensionMismatch,
PolynomialSizeMismatch,
DecompositionLevelCountMismatch,
DecompositionBaseLogMismatch,
Engine(EngineError),
}
Expand description
An error used with the GgswCiphertextDiscardingConversionEngine
trait.
This type provides a
GgswCiphertextDiscardingConversionError::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
GlweDimensionMismatch
Generic error: The input and output GLWE dimensions must be the same.
PolynomialSizeMismatch
Generic error: The input and output polynomial sizes must be the same.
DecompositionLevelCountMismatch
Generic error: The input and output decomposition level counts must be the same.
DecompositionBaseLogMismatch
Generic error: The input and output decomposition base log must be the same.
Engine(EngineError)
Specific error to the implementing engine.
Implementations
sourceimpl<EngineError: Error> GgswCiphertextDiscardingConversionError<EngineError>
impl<EngineError: Error> GgswCiphertextDiscardingConversionError<EngineError>
sourcepub fn perform_generic_checks<Input, Output>(
output: &Output,
input: &Input
) -> Result<(), Self>where
Input: GgswCiphertextEntity,
Output: GgswCiphertextEntity,
pub fn perform_generic_checks<Input, Output>(
output: &Output,
input: &Input
) -> Result<(), Self>where
Input: GgswCiphertextEntity,
Output: GgswCiphertextEntity,
Validates the inputs
Trait Implementations
sourceimpl<EngineError: Clone + Error> Clone for GgswCiphertextDiscardingConversionError<EngineError>
impl<EngineError: Clone + Error> Clone for GgswCiphertextDiscardingConversionError<EngineError>
sourcefn clone(&self) -> GgswCiphertextDiscardingConversionError<EngineError>
fn clone(&self) -> GgswCiphertextDiscardingConversionError<EngineError>
1.0.0 · sourceconst fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
source
. Read more