pub fn new<I>(range: Range<BigInt>, units: I, primary: usize) -> PhysicalBasetype
    where
        I: IntoIterator<Item = PhysicalUnit>,
    {
        PhysicalBasetype {
            range: range,
            units: units.into_iter().collect(),
            primary: primary,
        }
    }
/// Create a new physical type.
///
/// # Example
///
/// ```
/// use moore_vhdl::ty2::{PhysicalBasetype, PhysicalUnit, Range};
/// use moore_common::name::get_name_table;
///
/// let ty = PhysicalBasetype::new(Range::ascending(0, 1_000_000), vec![
///     PhysicalUnit::primary(get_name_table().intern("fs", false), 1),
///     PhysicalUnit::secondary(get_name_table().intern("ps", false), 1_000, 1000, 0),
///     PhysicalUnit::secondary(get_name_table().intern("ns", false), 1_000_000, 1000, 1),
/// ], 0);
///
/// assert_eq!(format!("{}", ty), "0 to 1000000 units (fs, ps, ns)");
/// ```
Create a new physical type.
Create a new physical type .
pub fn new<I>(range: Range<BigInt>, units: I, primary: usize) -> PhysicalBasetype
    where
        I: IntoIterator<Item = PhysicalUnit>,
    {
        PhysicalBasetype {
            range: range,
            units: units.into_iter().collect(),
            primary: primary,
        }
    }
pub fn new < I > ( range : Range < BigInt > , units : I , primary : usize ) -> PhysicalBasetype where I : IntoIterator < Item = PhysicalUnit > , { PhysicalBasetype { range : range , units : units . into_iter ( ) . collect ( ) , primary : primary , } }
Create a new physical type.
Create a new physical type .
range
Range<BigInt>
units
I
primary
usize
range
Range<BigInt>
units
I
primary
usize
example
```
use moore_vhdl::ty2::{PhysicalBasetype, PhysicalUnit, Range};
use moore_common::name::get_name_table.




` ` ` use moore_vhdl :: ty2 :: { PhysicalBasetype PhysicalUnit Range } ; use moore_common :: name :: get_name_table .