/**
    Creates a new non-empty interval from lower and upper bounds.

    Panics if the lower bound is greater than the lower bound
    or if the interval is empty.

    # Example

    ```
    use advanced_collections::interval::{Interval, LowerBound, UpperBound};
    fn main() {
        let l = LowerBound::new(3,false);
        let u = UpperBound::new(5,true);
        let i = Interval::from_bounds(l, u);
        assert_eq!(i, Interval::upper_closed(3,5));
    }
    ```
    */
Creates a new non-empty interval from lower and upper bounds.
Panics if the lower bound is greater than the lower bound
or if the interval is empty.
Creates a new non - empty interval from lower and upper bounds . Panics if the lower bound is greater than the lower bound or if the interval is empty .
pub fn from_bounds(lo: LowerBound<T>, up: UpperBound<T>) -> Self {
        let (l, lc) = lo.into_tuple();
        let (u, uc) = up.into_tuple();
        Self::create_checked(l, lc, u, uc)
    }
pub fn from_bounds ( lo : LowerBound < T > , up : UpperBound < T > ) -> Self { let ( l , lc ) = lo . into_tuple ( ) ; let ( u , uc ) = up . into_tuple ( ) ; Self :: create_checked ( l , lc , u , uc ) }
Creates a new non-empty interval from lower and upper bounds.
Creates a new non - empty interval from lower and upper bounds .
lo
LowerBound<T>
up
UpperBound<T>
example
```
use advanced_collections::interval::{Interval, LowerBound, UpperBound};
fn main() {
let l = LowerBound::new(3,false);
let u = UpperBound::new(5,true);
let i = Interval::from_bounds(l, u);
assert_eq!(i, Interval::upper_closed(3,5));
}
```
` ` ` use advanced_collections :: interval :: { Interval LowerBound UpperBound } ; fn main () { let l = LowerBound :: new ( 3 false ) ; let u = UpperBound :: new ( 5 true ) ; let i = Interval :: from_bounds ( l u ) ; assert_eq! ( i Interval :: upper_closed ( 3 5 )) ; } ` ` `