pub enum RuntimeError {
Show 18 variants IRError(Error), SealError(Error), MissingRelinearizationKeys, MissingGaloisKeys, IncorrectCiphertextCount, ParameterMismatch, ArgumentMismatch { expected: Vec<Type, Global>, actual: Vec<Type, Global>, }, ReturnMismatch { expected: Vec<Type, Global>, actual: Vec<Type, Global>, }, TypeMismatch { expected: Type, actual: Type, }, ReturnTypeMetadataError, TooMuchNoise, FheProgramRunError(FheProgramRunFailure), FheTypeError(String), ParamDeserializationError, NoPlaintextData, MalformedPlaintext, BincodeError(String), NotASealPlaintext,
}
Expand description

Represents an error that can occur in this crate.

Variants

IRError(Error)

An issue with an FheProgram.

SealError(Error)

An error occurred in the SEAL library.

MissingRelinearizationKeys

Tried to run an Fhe Program that requires relinearization keys, but didn’t provide any.

MissingGaloisKeys

Tried to run an Fhe Program that requires Galois keys, but didn’t provide any.

IncorrectCiphertextCount

Returned when:

  • The wrong number of ciphertexts were provided as parameters to an Fhe Program.
  • The wrong number of ciphertexts were returned from an Fhe Program.

ParameterMismatch

An argument is incompatible with the parameters in the runtime.

ArgumentMismatch

Fields

expected: Vec<Type, Global>

The arguments in the call signature of the FHE program.

actual: Vec<Type, Global>

The given arguments.

The given arguments do not match the call signature of the FHE program.

ReturnMismatch

Fields

expected: Vec<Type, Global>

The return types in the call signature of the FHE program.

actual: Vec<Type, Global>

The given return types.

The given return types do not match the FHE program interface.

TypeMismatch

Fields

expected: Type

The expected type.

actual: Type

The actual type.

The given type does not match the expected.

ReturnTypeMetadataError

The vector indicating the number of ciphertexts in the return types isn’t the same length as the signature’s return type. Running valid FHE programs created by the Sunscreen compiler should never produce this error.

TooMuchNoise

Decryption failed because the cipher text had too much noise.

FheProgramRunError(FheProgramRunFailure)

Executing an Fhe Program failed.

FheTypeError(String)

This variant wraps some error specific to the representation of FheTypes. For example, a type encoding even numbers would return this if you pass an odd number.

ParamDeserializationError

Failed to deserialize bytes as a Params object.

NoPlaintextData

The given Plaintext had no data.

MalformedPlaintext

The given Plaintext had an incorrect array count.

BincodeError(String)

An error occurred when serializing/deserializing with bincode.

NotASealPlaintext

Called inner_as_seal_plaintext on non-Seal plaintext.

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The alignment of pointer.
The type for initializers.
Initializes a with the given initializer. Read more
Dereferences the given pointer. Read more
Mutably dereferences the given pointer. Read more
Drops the object pointed to by the given pointer. Read more
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.