# Trait glib::value::FromValueOptional [−] [src]

    pub trait FromValueOptional<'a>: StaticType + Sized {
        unsafe fn from_value_optional(_: &'a Value) -> Option<Self>;
    }

Extracts a value.

Types that don't support a `None` value always return `Some`.

## Required Methods

### `unsafe fn from_value_optional(_: &'a Value) -> Option<Self>`

## Implementations on Foreign Types

### `impl<'a> FromValueOptional<'a> for String`
[src]

#### `unsafe fn from_value_optional(value: &'a Value) -> Option<Self>`
[src]

### `impl<'a> FromValueOptional<'a> for &'a str`
[src]

#### `unsafe fn from_value_optional(value: &'a Value) -> Option<Self>`
[src]

### `impl<'a> FromValueOptional<'a> for bool`
[src]

#### `unsafe fn from_value_optional(value: &'a Value) -> Option<Self>`
[src]

### `impl<'a> FromValueOptional<'a> for i8`
[src]

#### `unsafe fn from_value_optional(value: &'a Value) -> Option<Self>`
[src]

### `impl<'a> FromValueOptional<'a> for u8`
[src]

#### `unsafe fn from_value_optional(value: &'a Value) -> Option<Self>`
[src]

### `impl<'a> FromValueOptional<'a> for i32`
[src]

#### `unsafe fn from_value_optional(value: &'a Value) -> Option<Self>`
[src]

### `impl<'a> FromValueOptional<'a> for u32`
[src]

#### `unsafe fn from_value_optional(value: &'a Value) -> Option<Self>`
[src]

### `impl<'a> FromValueOptional<'a> for i64`
[src]

#### `unsafe fn from_value_optional(value: &'a Value) -> Option<Self>`
[src]

### `impl<'a> FromValueOptional<'a> for u64`
[src]

#### `unsafe fn from_value_optional(value: &'a Value) -> Option<Self>`
[src]

### `impl<'a> FromValueOptional<'a> for f32`
[src]

#### `unsafe fn from_value_optional(value: &'a Value) -> Option<Self>`
[src]

### `impl<'a> FromValueOptional<'a> for f64`
[src]

#### `unsafe fn from_value_optional(value: &'a Value) -> Option<Self>`
[src]

## Implementors

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