# Trait glib::translate::FromGlib [−] [src]

    pub trait FromGlib<T>: Sized {
        fn from_glib(val: T) -> Self;
    }

Translate a simple type.

## Required Methods

### `fn from_glib(val: T) -> Self`

## Implementations on Foreign Types

### `impl FromGlib<gboolean> for bool`
[src]

#### `fn from_glib(val: gboolean) -> bool`
[src]

### `impl FromGlib<u32> for char`
[src]

#### `fn from_glib(val: u32) -> char`
[src]

### `impl FromGlib<i32> for Ordering`
[src]

#### `fn from_glib(val: i32) -> Ordering`
[src]

### `impl FromGlib<u32> for Option<char>`
[src]

#### `fn from_glib(val: u32) -> Option<char>`
[src]

### `impl FromGlib<i32> for Option<u32>`
[src]

#### `fn from_glib(val: i32) -> Option<u32>`
[src]

### `impl FromGlib<i64> for Option<u64>`
[src]

#### `fn from_glib(val: i64) -> Option<u64>`
[src]

### `impl FromGlib<i32> for Option<u64>`
[src]

#### `fn from_glib(val: i32) -> Option<u64>`
[src]

## Implementors

- [src]
  `impl FromGlib<u32> for SourceId`
- [src]
  `impl FromGlib<i32> for Priority`
- [src]
  `impl FromGlib<GType> for Type`

# 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
+ / -
  Collapse/expand 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`)