# Trait glib::variant::ToVariant [−] [src]

    pub trait ToVariant {
        fn to_variant(&self) -> Variant;
    }

Converts to `Variant`.

## Required Methods

### `fn to_variant(&self) -> Variant`

Returns a `Variant` clone of `self`.

## Implementations on Foreign Types

### `impl<'a, T: ?Sized + ToVariant> ToVariant for &'a T`
[src]

#### `fn to_variant(&self) -> Variant`
[src]

### `impl ToVariant for u8`
[src]

#### `fn to_variant(&self) -> Variant`
[src]

### `impl ToVariant for i16`
[src]

#### `fn to_variant(&self) -> Variant`
[src]

### `impl ToVariant for u16`
[src]

#### `fn to_variant(&self) -> Variant`
[src]

### `impl ToVariant for i32`
[src]

#### `fn to_variant(&self) -> Variant`
[src]

### `impl ToVariant for u32`
[src]

#### `fn to_variant(&self) -> Variant`
[src]

### `impl ToVariant for i64`
[src]

#### `fn to_variant(&self) -> Variant`
[src]

### `impl ToVariant for u64`
[src]

#### `fn to_variant(&self) -> Variant`
[src]

### `impl ToVariant for f64`
[src]

#### `fn to_variant(&self) -> Variant`
[src]

### `impl ToVariant for bool`
[src]

#### `fn to_variant(&self) -> Variant`
[src]

### `impl ToVariant for String`
[src]

#### `fn to_variant(&self) -> Variant`
[src]

### `impl ToVariant for str`
[src]

#### `fn to_variant(&self) -> Variant`
[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`)