about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2013-12-09 05:51:29 -0800
committerbors <bors@rust-lang.org>2013-12-09 05:51:29 -0800
commit4e0cb316fc980f00e1b74f3fdb7a842b540be280 (patch)
tree51362992c913303ab3c2ac8e4a88d86f3c061f74 /src/libstd
parenta417dbd1c71c168fe7db71efb98d22b5e22dcce1 (diff)
parent4051713625d7b75846619a3ba74d0ada8695c5a9 (diff)
downloadrust-4e0cb316fc980f00e1b74f3fdb7a842b540be280.tar.gz
rust-4e0cb316fc980f00e1b74f3fdb7a842b540be280.zip
auto merge of #10840 : cmr/rust/any_docs2, r=huonw
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/any.rs9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/libstd/any.rs b/src/libstd/any.rs
index 6a3e6933001..4133bb1835d 100644
--- a/src/libstd/any.rs
+++ b/src/libstd/any.rs
@@ -9,7 +9,14 @@
 // except according to those terms.
 
 //! This module implements the `Any` trait, which enables dynamic typing
-//! of any type.
+//! of any type, through runtime reflection.
+//!
+//! `Any` itself can be used to get a `TypeId`, and has more features when used as a trait object.
+//! As `&Any` (a borrowed trait object), it has the `is` and `as_ref` methods, to test if the
+//! contained value is of a given type, and to get a reference to the inner value as a type. As
+//! `&mut Any`, there is also the `as_mut` method, for getting a mutable reference to the inner
+//! value. `~Any` adds the `move` method, which will unwrap a `~T` from the object.  See the
+//! extension traits (`*Ext`) for the full details.
 
 use cast::transmute;
 use option::{Option, Some, None};