#[non_exhaustive]
pub enum LweCiphertextVectorDiscardingConversionError<EngineError: Error> {
LweDimensionMismatch,
CiphertextCountMismatch,
Engine(EngineError),
}
Expand description
An error used with the LweCiphertextVectorDiscardingConversionEngine
trait.
This type provides a
LweCiphertextVectorDiscardingConversionError::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
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
LweDimensionMismatch
Generic error: The input and output LWE dimension must be the same.
CiphertextCountMismatch
Generic error: The input and output ciphertext count must be the same.
Engine(EngineError)
Specific error to the implementing engine.
Implementations§
source§impl<EngineError: Error> LweCiphertextVectorDiscardingConversionError<EngineError>
impl<EngineError: Error> LweCiphertextVectorDiscardingConversionError<EngineError>
sourcepub fn perform_generic_checks<Input, Output>(
output: &Output,
input: &Input
) -> Result<(), Self>where
Input: LweCiphertextVectorEntity,
Output: LweCiphertextVectorEntity,
pub fn perform_generic_checks<Input, Output>(
output: &Output,
input: &Input
) -> Result<(), Self>where
Input: LweCiphertextVectorEntity,
Output: LweCiphertextVectorEntity,
Validates the inputs
Trait Implementations§
source§impl<EngineError: Clone + Error> Clone for LweCiphertextVectorDiscardingConversionError<EngineError>
impl<EngineError: Clone + Error> Clone for LweCiphertextVectorDiscardingConversionError<EngineError>
source§fn clone(&self) -> LweCiphertextVectorDiscardingConversionError<EngineError>
fn clone(&self) -> LweCiphertextVectorDiscardingConversionError<EngineError>
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<EngineError: Debug + Error> Debug for LweCiphertextVectorDiscardingConversionError<EngineError>
impl<EngineError: Debug + Error> Debug for LweCiphertextVectorDiscardingConversionError<EngineError>
source§impl<EngineError: Error> Display for LweCiphertextVectorDiscardingConversionError<EngineError>
impl<EngineError: Error> Display for LweCiphertextVectorDiscardingConversionError<EngineError>
source§impl<EngineError: Error> Error for LweCiphertextVectorDiscardingConversionError<EngineError>
impl<EngineError: Error> Error for LweCiphertextVectorDiscardingConversionError<EngineError>
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()