#[repr(C)]pub struct NumberAffinityBuilder { /* private fields */ }Expand description
Builder for NumberAffinity
Implementations§
Source§impl NumberAffinityBuilder
impl NumberAffinityBuilder
Sourcepub const fn new() -> NumberAffinityBuilder
pub const fn new() -> NumberAffinityBuilder
Creates a new NumberAffinityBuilder
Sourcepub const fn integer(
self,
bits: usize,
sign: Signedness,
) -> NumberAffinityBuilder
pub const fn integer( self, bits: usize, sign: Signedness, ) -> NumberAffinityBuilder
Sets the number limits as integer with specified bits and sign
Sourcepub const fn signed_integer(self, bits: usize) -> NumberAffinityBuilder
pub const fn signed_integer(self, bits: usize) -> NumberAffinityBuilder
Sets the number limits as signed integer with specified bits
Sourcepub const fn unsigned_integer(self, bits: usize) -> NumberAffinityBuilder
pub const fn unsigned_integer(self, bits: usize) -> NumberAffinityBuilder
Sets the number limits as unsigned integer with specified bits
Sourcepub const fn float(
self,
sign_bits: usize,
exponent_bits: usize,
mantissa_bits: usize,
has_explicit_first_mantissa_bit: bool,
) -> NumberAffinityBuilder
pub const fn float( self, sign_bits: usize, exponent_bits: usize, mantissa_bits: usize, has_explicit_first_mantissa_bit: bool, ) -> NumberAffinityBuilder
Sets the number limits as float with specified bits
Sourcepub const fn fixed(
self,
sign_bits: usize,
integer_bits: usize,
fraction_bits: usize,
) -> NumberAffinityBuilder
pub const fn fixed( self, sign_bits: usize, integer_bits: usize, fraction_bits: usize, ) -> NumberAffinityBuilder
Sets the number limits as fixed-point with specified bits
Sourcepub const fn min(self, min: PtrConst<'static>) -> NumberAffinityBuilder
pub const fn min(self, min: PtrConst<'static>) -> NumberAffinityBuilder
Sets the min value for the NumberAffinity
Sourcepub const fn max(self, max: PtrConst<'static>) -> NumberAffinityBuilder
pub const fn max(self, max: PtrConst<'static>) -> NumberAffinityBuilder
Sets the max value for the NumberAffinity
Sourcepub const fn positive_infinity(
self,
value: PtrConst<'static>,
) -> NumberAffinityBuilder
pub const fn positive_infinity( self, value: PtrConst<'static>, ) -> NumberAffinityBuilder
Sets the positive infinity value for the NumberAffinity
Sourcepub const fn negative_infinity(
self,
value: PtrConst<'static>,
) -> NumberAffinityBuilder
pub const fn negative_infinity( self, value: PtrConst<'static>, ) -> NumberAffinityBuilder
Sets the negative infinity value for the NumberAffinity
Sourcepub const fn nan_sample(self, value: PtrConst<'static>) -> NumberAffinityBuilder
pub const fn nan_sample(self, value: PtrConst<'static>) -> NumberAffinityBuilder
Sets the NaN sample value for the NumberAffinity
Sourcepub const fn positive_zero(
self,
value: PtrConst<'static>,
) -> NumberAffinityBuilder
pub const fn positive_zero( self, value: PtrConst<'static>, ) -> NumberAffinityBuilder
Sets the positive zero value for the NumberAffinity
Sourcepub const fn negative_zero(
self,
value: PtrConst<'static>,
) -> NumberAffinityBuilder
pub const fn negative_zero( self, value: PtrConst<'static>, ) -> NumberAffinityBuilder
Sets the negative zero value for the NumberAffinity
Sourcepub const fn epsilon(self, value: PtrConst<'static>) -> NumberAffinityBuilder
pub const fn epsilon(self, value: PtrConst<'static>) -> NumberAffinityBuilder
Sets the relative uncertainty for the NumberAffinity
Sourcepub const fn build(self) -> ScalarAffinity
pub const fn build(self) -> ScalarAffinity
Builds the ScalarAffinity