Function xcb::base::pack_bitfield [] [src]

pub fn pack_bitfield<T, L>(bf: &mut Vec<(T, L)>) -> (T, Vec<L>) where
    T: Ord + Zero + Copy + BitAnd<Output = T> + BitOr<Output = T>,
    L: Copy

pack bitfields tuples into vector usable for FFI requests let values = [ (xcb::CW_EVENT_MASK, xcb::EVENT_MASK_EXPOSURE | xcb::EVENT_MASK_KEY_PRESS), (xcb::CW_BACK_PIXEL, 0xffffffff), ]; let ffi_values = ( xcb::CW_BACK_PIXEL | xcb::CW_EVENT_MASK, [ Oxffffffff, xcb::EVENT_MASK_EXPOSURE | xcb::EVENT_MASK_KEY_PRESS, 0 ] ); assert_eq!(pack_bitfield(&mut values), ffi_values);