pub fn from_fields(d1: u32, d2: u16, d3: u16, d4: &[u8]) -> Uuid {
        use std::unstable::intrinsics::{to_be16, to_be32};

        // First construct a temporary field-based struct
        let mut fields = UuidFields {
                data1: 0,
                data2: 0,
                data3: 0,
                data4: [0, ..8]
        };

        fields.data1 = to_be32(d1 as i32) as u32;
        fields.data2 = to_be16(d2 as i16) as u16;
        fields.data3 = to_be16(d3 as i16) as u16;
        vec::bytes::copy_memory(fields.data4, d4);

        unsafe {
            transmute(fields)
        }
    }
/// Creates a UUID using the supplied field values
///
/// # Arguments
/// * `d1` A 32-bit word
/// * `d2` A 16-bit word
/// * `d3` A 16-bit word
/// * `d4` Array of 8 octets
Creates a UUID using the supplied field values
Creates a UUID using the supplied field values
pub fn from_fields(d1: u32, d2: u16, d3: u16, d4: &[u8]) -> Uuid {
        use std::unstable::intrinsics::{to_be16, to_be32};
        // First construct a temporary field-based struct
        let mut fields = UuidFields {
                data1: 0,
                data2: 0,
                data3: 0,
                data4: [0, ..8]
        };
        fields.data1 = to_be32(d1 as i32) as u32;
        fields.data2 = to_be16(d2 as i16) as u16;
        fields.data3 = to_be16(d3 as i16) as u16;
        vec::bytes::copy_memory(fields.data4, d4);
        unsafe {
            transmute(fields)
        }
    }
pub fn from_fields ( d1 : u32 , d2 : u16 , d3 : u16 , d4 : & [ u8 ] ) -> Uuid { use std :: unstable :: intrinsics :: { to_be16 , to_be32 } ; // First construct a temporary field-based struct let mut fields = UuidFields { data1 : 0 , data2 : 0 , data3 : 0 , data4 : [ 0 , .. 8 ] } ; fields . data1 = to_be32 ( d1 as i32 ) as u32 ; fields . data2 = to_be16 ( d2 as i16 ) as u16 ; fields . data3 = to_be16 ( d3 as i16 ) as u16 ; vec :: bytes :: copy_memory ( fields . data4 , d4 ) ; unsafe { transmute ( fields ) } }
Creates a UUID using the supplied field values
Creates a UUID using the supplied field values
d1
u32
d2
u16
d3
u16
d4
&[u8]
d1
u32
d2
u16
d3
u16
d4
&[u8]