# Trait core::raw::Repr [−] [src]

    pub unsafe trait Repr<T> {
        fn repr(&self) -> T { ... }
    }

Unstable (`raw` #27751)

This trait is meant to map equivalences between raw structs and their corresponding rust values.

## Provided Methods

### `fn repr(&self) -> T`

Unstable (`raw` #27751)

This function "unwraps" a rust value (without consuming it) into its raw struct representation. This can be used to read/write different values for the struct. This is a safe method because by default it does not enable write-access to the fields of the return value in safe code.

## Implementors

- `impl<T> Repr<Slice<T>> for [T]`
- `impl Repr<Slice<u8>> for str`

# Help

## Keyboard Shortcuts

?
  Show this help dialog
S
  Focus the search field
⇤
  Move up in search results
⇥
  Move down in search results
⏎
  Go to active search result

## 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`)