Struct tfhe::ConfigBuilder
source · pub struct ConfigBuilder { /* private fields */ }boolean or shortint or integer only.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§
source§impl 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
pub fn enable_default_bool(self) -> Self
boolean only.pub fn enable_custom_bool(self, params: FheBoolParameters) -> Self
boolean only.pub fn disable_bool(self) -> Self
boolean only.pub fn enable_default_uint2(self) -> Self
shortint only.pub fn enable_default_uint3(self) -> Self
shortint only.pub fn enable_default_uint4(self) -> Self
shortint only.pub fn enable_default_integers(self) -> Self
integer only.pub fn enable_default_integers_small(self) -> Self
integer only.pub fn enable_custom_integers<P>( self, block_parameters: P, wopbs_block_parameters: Option<WopbsParameters> ) -> Selfwhere P: Into<PBSParameters>,
integer only.pub fn disable_integers(self) -> Self
integer only.pub fn build(self) -> Config
Trait Implementations§
source§impl Clone for ConfigBuilder
impl Clone for ConfigBuilder
source§fn clone(&self) -> ConfigBuilder
fn clone(&self) -> ConfigBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more