/// Create a new instance of the V1 type
Create a new instance of the V1 type
Create a new instance of the V1 type
pub fn new_v1(base: B, val: V1) -> Box<Self> {
        let inner = UnsizedEnum_V1 {
            header: Header { disc: 1, base },
            val,
            phantomdata: PhantomData,
        };
        // Safe because the rest of the code uses `disc` to decide how
        // to interpret the `val` part of the structure
        unsafe {
            let p = Self::alloc();
            ptr::write(p as *mut UnsizedEnum_V1<B, V0, V1>, inner);
            Box::from_raw(p)
        }
    }
pub fn new_v1 ( base : B , val : V1 ) -> Box < Self > { let inner = UnsizedEnum_V1 { header : Header { disc : 1 , base } , val , phantomdata : PhantomData , } ; // Safe because the rest of the code uses `disc` to decide how // to interpret the `val` part of the structure unsafe { let p = Self :: alloc ( ) ; ptr :: write ( p as * mut UnsizedEnum_V1 < B , V0 , V1 > , inner ) ; Box :: from_raw ( p ) } }
Create a new instance of the V1 type
Create a new instance of the V1 type
base
B
val
V1