Struct concrete::ConfigBuilder
source · [−]pub struct ConfigBuilder { /* private fields */ }
Expand description
The builder to create your config
This struct is what you will to use to build your configuration.
Why ?
The configuration is needed to select which types you are going to use or not and which parameters you wish to use for these types (whether it is the default parameters or some custom parameters).
To be able to configure a type, its “cargo feature kind” must be enabled (see the table).
The configuration is needed for the crate to be able to initialize and generate all the needed client and server keys as well as other internal details.
As generating these keys and details for types that you are not going to use would be a waste of time and space (both memory and disk if you serialize), generating a config is an important step.
Implementations
sourceimpl ConfigBuilder
impl ConfigBuilder
sourcepub fn all_enabled() -> Self
pub fn all_enabled() -> Self
Create a new builder with all the data types activated with their default parameters
sourcepub fn all_disabled() -> Self
pub fn all_disabled() -> Self
Create a new builder with all the data types disabled
sourcepub fn enable_default_bool(self) -> Self
Available on crate feature booleans
only.
pub fn enable_default_bool(self) -> Self
booleans
only.Enables the FheBool type with default parameters
sourcepub fn enable_custom_bool(self, params: FheBoolParameters) -> Self
Available on crate feature booleans
only.
pub fn enable_custom_bool(self, params: FheBoolParameters) -> Self
booleans
only.Enables the FheBool type with the given parameters
sourcepub fn disable_bool(self) -> Self
Available on crate feature booleans
only.
pub fn disable_bool(self) -> Self
booleans
only.Disables the FheBool type
sourcepub fn add_bool_type(
&mut self,
parameters: FheBoolParameters
) -> DynFheBoolEncryptor
Available on crate feature booleans
only.
pub fn add_bool_type(
&mut self,
parameters: FheBoolParameters
) -> DynFheBoolEncryptor
booleans
only.Creates a new boolean type with the given parameters
Returns
This returns the Encryptor of the new type
sourcepub fn enable_default_uint2(self) -> Self
Available on crate feature shortints
only.
pub fn enable_default_uint2(self) -> Self
shortints
only.Enables the FheUint2 type with default parameters
sourcepub fn enable_custom_uint2(self, params: FheUint2Parameters) -> Self
Available on crate feature shortints
only.
pub fn enable_custom_uint2(self, params: FheUint2Parameters) -> Self
shortints
only.Enables the FheUint2 type with the given parameters
sourcepub fn disable_uint2(self) -> Self
Available on crate feature shortints
only.
pub fn disable_uint2(self) -> Self
shortints
only.Disables the FheUint2 type
sourcepub fn enable_default_uint3(self) -> Self
Available on crate feature shortints
only.
pub fn enable_default_uint3(self) -> Self
shortints
only.Enables the FheUint3 type with default parameters
sourcepub fn enable_custom_uint3(self, params: FheUint3Parameters) -> Self
Available on crate feature shortints
only.
pub fn enable_custom_uint3(self, params: FheUint3Parameters) -> Self
shortints
only.Enables the FheUint3 type with the given parameters
sourcepub fn disable_uint3(self) -> Self
Available on crate feature shortints
only.
pub fn disable_uint3(self) -> Self
shortints
only.Disables the FheUint3 type
sourcepub fn enable_default_uint4(self) -> Self
Available on crate feature shortints
only.
pub fn enable_default_uint4(self) -> Self
shortints
only.Enables the FheUint4 type with default parameters
sourcepub fn enable_custom_uint4(self, params: FheUint4Parameters) -> Self
Available on crate feature shortints
only.
pub fn enable_custom_uint4(self, params: FheUint4Parameters) -> Self
shortints
only.Enables the FheUint4 type with the given parameters
sourcepub fn disable_uint4(self) -> Self
Available on crate feature shortints
only.
pub fn disable_uint4(self) -> Self
shortints
only.Disables the FheUint4 type
sourcepub fn add_short_int_type(
&mut self,
parameters: DynShortIntParameters
) -> DynShortIntEncryptor
Available on crate feature shortints
only.
pub fn add_short_int_type(
&mut self,
parameters: DynShortIntParameters
) -> DynShortIntEncryptor
shortints
only.Creates a new short integer type with the given parameters
Returns
This returns the Encryptor of the new type
pub fn enable_default_uint8(self) -> Self
integers
only.pub fn disable_uint8(self) -> Self
integers
only.pub fn enable_default_uint12(self) -> Self
integers
only.pub fn disable_uint12(self) -> Self
integers
only.pub fn enable_default_uint16(self) -> Self
integers
only.pub fn disable_uint16(self) -> Self
integers
only.pub fn add_integer_type<P: Into<DynIntegerParameters>>(
&mut self,
parameters: P
) -> DynIntegerEncryptor
integers
only.