Struct NumberAffinityBuilder

Source
#[repr(C)]
pub struct NumberAffinityBuilder { /* private fields */ }
Expand description

Builder for NumberAffinity

Implementations§

Source§

impl NumberAffinityBuilder

Source

pub const fn new() -> NumberAffinityBuilder

Creates a new NumberAffinityBuilder

Source

pub const fn integer( self, bits: usize, sign: Signedness, ) -> NumberAffinityBuilder

Sets the number limits as integer with specified bits and sign

Source

pub const fn signed_integer(self, bits: usize) -> NumberAffinityBuilder

Sets the number limits as signed integer with specified bits

Source

pub const fn unsigned_integer(self, bits: usize) -> NumberAffinityBuilder

Sets the number limits as unsigned integer with specified bits

Source

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

Source

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

Source

pub const fn min(self, min: PtrConst<'static>) -> NumberAffinityBuilder

Sets the min value for the NumberAffinity

Source

pub const fn max(self, max: PtrConst<'static>) -> NumberAffinityBuilder

Sets the max value for the NumberAffinity

Source

pub const fn positive_infinity( self, value: PtrConst<'static>, ) -> NumberAffinityBuilder

Sets the positive infinity value for the NumberAffinity

Source

pub const fn negative_infinity( self, value: PtrConst<'static>, ) -> NumberAffinityBuilder

Sets the negative infinity value for the NumberAffinity

Source

pub const fn nan_sample(self, value: PtrConst<'static>) -> NumberAffinityBuilder

Sets the NaN sample value for the NumberAffinity

Source

pub const fn positive_zero( self, value: PtrConst<'static>, ) -> NumberAffinityBuilder

Sets the positive zero value for the NumberAffinity

Source

pub const fn negative_zero( self, value: PtrConst<'static>, ) -> NumberAffinityBuilder

Sets the negative zero value for the NumberAffinity

Source

pub const fn epsilon(self, value: PtrConst<'static>) -> NumberAffinityBuilder

Sets the relative uncertainty for the NumberAffinity

Source

pub const fn build(self) -> ScalarAffinity

Builds the ScalarAffinity

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.