# Trait core::any::Any 1.0.0 [−] [src]

    pub trait Any: Reflect + 'static {
        fn get_type_id(&self) -> TypeId;
    }

A type to emulate dynamic typing.

Every type with no non-`'static` references implements `Any`. See the module-level documentation for more details.

## Required Methods

### `fn get_type_id(&self) -> TypeId`

Unstable (`get_type_id` #27745)

: this method will likely be replaced by an associated static

Gets the `TypeId` of `self`.

## Methods

### `impl Any`
[src]

#### `fn is<T: Any>(&self) -> bool`

Returns true if the boxed type is the same as `T`

#### `fn downcast_ref<T: Any>(&self) -> Option<&T>`

Returns some reference to the boxed value if it is of type `T`, or `None` if it isn't.

#### `fn downcast_mut<T: Any>(&mut self) -> Option<&mut T>`

Returns some mutable reference to the boxed value if it is of type `T`, or `None` if it isn't.

### `impl Any + Send`
[src]

#### `fn is<T: Any>(&self) -> bool`

Forwards to the method defined on the type `Any`.

#### `fn downcast_ref<T: Any>(&self) -> Option<&T>`

Forwards to the method defined on the type `Any`.

#### `fn downcast_mut<T: Any>(&mut self) -> Option<&mut T>`

Forwards to the method defined on the type `Any`.

## Trait Implementations

### `impl Debug for Any`
[src]

#### `fn fmt(&self, f: &mut Formatter) -> Result`

### `impl Debug for Any + Send`
[src]

#### `fn fmt(&self, f: &mut Formatter) -> Result`

## Implementors

- `impl<T: Reflect + 'static + ?Sized> Any for T`

# 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` or `* -> vec`)