#[non_exhaustive]pub enum LweCiphertextVectorDiscardingLoadingError<EngineError: Error> {
LweDimensionMismatch,
UnorderedInputRange,
OutOfVectorInputRange,
UnorderedOutputRange,
OutOfVectorOutputRange,
RangeSizeMismatch,
Engine(EngineError),
}Expand description
An error used with the LweCiphertextVectorDiscardingLoadingEngine trait.
This type provides a
LweCiphertextVectorDiscardingLoadingError::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
LweDimensionMismatch
Generic error: The input and output LWE dimension must be the same.
UnorderedInputRange
Generic error: The input range bounds must be ordered.
OutOfVectorInputRange
Generic error: The input vector must contain the input range.
UnorderedOutputRange
Generic error: The output range bound must be ordered.
OutOfVectorOutputRange
Generic error: The output vector must contain the output range.
RangeSizeMismatch
Generic error: The input and output range must have the same size.
Engine(EngineError)
Specific error to the implementing engine.
Implementations§
Source§impl<EngineError: Error> LweCiphertextVectorDiscardingLoadingError<EngineError>
impl<EngineError: Error> LweCiphertextVectorDiscardingLoadingError<EngineError>
Sourcepub fn perform_generic_checks<InputCiphertextVector, OutputCiphertextVector>(
output_vector: &OutputCiphertextVector,
input_vector: &InputCiphertextVector,
output_range: LweCiphertextRange,
input_range: LweCiphertextRange,
) -> Result<(), Self>where
InputCiphertextVector: LweCiphertextVectorEntity,
OutputCiphertextVector: LweCiphertextVectorEntity<KeyDistribution = InputCiphertextVector::KeyDistribution>,
pub fn perform_generic_checks<InputCiphertextVector, OutputCiphertextVector>(
output_vector: &OutputCiphertextVector,
input_vector: &InputCiphertextVector,
output_range: LweCiphertextRange,
input_range: LweCiphertextRange,
) -> Result<(), Self>where
InputCiphertextVector: LweCiphertextVectorEntity,
OutputCiphertextVector: LweCiphertextVectorEntity<KeyDistribution = InputCiphertextVector::KeyDistribution>,
Validates the inputs
Trait Implementations§
Source§impl<EngineError: Clone + Error> Clone for LweCiphertextVectorDiscardingLoadingError<EngineError>
impl<EngineError: Clone + Error> Clone for LweCiphertextVectorDiscardingLoadingError<EngineError>
Source§fn clone(&self) -> LweCiphertextVectorDiscardingLoadingError<EngineError>
fn clone(&self) -> LweCiphertextVectorDiscardingLoadingError<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 LweCiphertextVectorDiscardingLoadingError<EngineError>
impl<EngineError: Debug + Error> Debug for LweCiphertextVectorDiscardingLoadingError<EngineError>
Source§impl<EngineError: Error> Display for LweCiphertextVectorDiscardingLoadingError<EngineError>
impl<EngineError: Error> Display for LweCiphertextVectorDiscardingLoadingError<EngineError>
Source§impl<EngineError: Error> Error for LweCiphertextVectorDiscardingLoadingError<EngineError>
impl<EngineError: Error> Error for LweCiphertextVectorDiscardingLoadingError<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 LweCiphertextVectorDiscardingLoadingError<EngineError>
impl<EngineError: PartialEq + Error> PartialEq for LweCiphertextVectorDiscardingLoadingError<EngineError>
Source§fn eq(
&self,
other: &LweCiphertextVectorDiscardingLoadingError<EngineError>,
) -> bool
fn eq( &self, other: &LweCiphertextVectorDiscardingLoadingError<EngineError>, ) -> bool
self and other values to be equal, and is used by ==.