ValFromInto

Trait ValFromInto 

Source
pub trait ValFromInto<T> {
    // Required methods
    fn val_into(&self) -> T;
    fn val_from(val: &T) -> Self;
}

Required Methods§

Source

fn val_into(&self) -> T

Source

fn val_from(val: &T) -> Self

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl ValFromInto<bool> for bool

Source§

fn val_into(&self) -> bool

Source§

fn val_from(val: &bool) -> Self

Source§

impl ValFromInto<f32> for f32

Source§

fn val_into(&self) -> f32

Source§

fn val_from(val: &f32) -> Self

Source§

impl ValFromInto<f64> for f64

Source§

fn val_into(&self) -> f64

Source§

fn val_from(val: &f64) -> Self

Implementors§

Source§

impl<T, U> ValFromInto<Option<U>> for BitisOption<T>

Source§

impl<T: Clone + IntegerBaseFunctions + Sized + BiserdiTraitVarBitSize + Default + Display + Debug, const NUM_BITS: u64> ValFromInto<T> for IntWithGivenBitSize<T, NUM_BITS>

Source§

impl<T: Display + Sized + Copy + BiserdiTraitVarBitSize + AddAssign + Shl<Output = T> + Shr + Ord + PartialEq + TryFrom<u64> + Default + IntegerBaseFunctions, const MAX_BITS: u8, const BIT_PACKS: u8> ValFromInto<T> for DynInteger<T, MAX_BITS, BIT_PACKS>

Source§

impl<T: Sized + Clone + BiserdiTrait + Default + Debug + ValFromInto<U>, const N: usize, U> ValFromInto<[U; N]> for FixedArray<T, N>

Source§

impl<T: Sized + BiserdiTrait + Default + Debug + ValFromInto<U>, const DYNSIZEBITS: u8, U> ValFromInto<Vec<U>> for DynArray<T, DYNSIZEBITS>

Source§

impl<const DYNSIZEBITS: u8> ValFromInto<String> for BitisAString<DYNSIZEBITS>

Source§

impl<const NUM_BITS: u8, const MIN_IVALUE: i64, const MAX_IVALUE: i64> ValFromInto<f64> for FixPrecisionMinMax<NUM_BITS, MIN_IVALUE, MAX_IVALUE>