# Function ocl_core::util::into_bytes [−] [src]

ⓘImportant traits for Vec<u8>

### Important traits for Vec<u8>

`impl Write for Vec<u8>`

    pub unsafe fn into_bytes<T>(val: T) -> Vec<u8>

[UNTESTED] Copies an arbitrary primitive or struct into core bytes.

### Depth

This is not a deep copy, will only copy the surface of primitives, structs, etc. Not 100% sure about what happens with other types but should copy everything zero levels deep.

### Endianness

98% sure (speculative) this will always be correct due to the driver automatically taking it into account.

### Safety

Don't ask.

[FIXME]: Evaluate the ins and outs of this and lock this down a bit.

# Help

## Keyboard Shortcuts

`?`
  Show this help dialog
`S`
  Focus the search field
`↑`
  Move up in search results
`↓`
  Move down in search results
`↹`
  Switch tab
`⏎`
  Go to active search result
`+`
  Expand all sections
`-`
  Collapse all sections

## Search Tricks

Prefix searches with a type followed by a colon (e.g. `fn:`) to restrict the search to a given type.

Accepted types are: `fn`, `mod`, `struct`, `enum`, `trait`, `type`, `macro`, and `const`.

Search functions by type signature (e.g. `vec -> usize` or `* -> vec`)