File tree 1 file changed +8
-1
lines changed
1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change 9
9
// except according to those terms.
10
10
11
11
//! This module implements the `Any` trait, which enables dynamic typing
12
- //! of any type.
12
+ //! of any type, through runtime reflection.
13
+ //!
14
+ //! `Any` itself can be used to get a `TypeId`, and has more features when used as a trait object.
15
+ //! As `&Any` (a borrowed trait object), it has the `is` and `as_ref` methods, to test if the
16
+ //! contained value is of a given type, and to get a reference to the inner value as a type. As
17
+ //! `&mut Any`, there is also the `as_mut` method, for getting a mutable reference to the inner
18
+ //! value. `~Any` adds the `move` method, which will unwrap a `~T` from the object. See the
19
+ //! extension traits (`*Ext`) for the full details.
13
20
14
21
use cast:: transmute;
15
22
use option:: { Option , Some , None } ;
You can’t perform that action at this time.
0 commit comments