File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change 1313//!
1414//! `Any` itself can be used to get a `TypeId`, and has more features when used
1515//! as a trait object. As `&Any` (a borrowed trait object), it has the `is` and
16- //! `as_ref` methods, to test if the contained value is of a given type, and to
17- //! get a reference to the inner value as a type. As `&mut Any`, there is also
18- //! the `as_mut` method, for getting a mutable reference to the inner value.
19- //! `Box<Any>` adds the `move` method, which will unwrap a `Box<T>` from the
20- //! object. See the extension traits (`*Ext`) for the full details.
16+ //! `downcast_ref` methods, to test if the contained value is of a given type,
17+ //! and to get a reference to the inner value as a type. As `&mut Any`, there
18+ //! is also the `downcast_mut` method, for getting a mutable reference to the
19+ //! inner value. `Box<Any>` adds the `move` method, which will unwrap a
20+ //! `Box<T>` from the object. See the extension traits (`*Ext`) for the full
21+ //! details.
2122//!
2223//! Note that &Any is limited to testing whether a value is of a specified
2324//! concrete type, and cannot be used to test whether a type implements a trait.
You can’t perform that action at this time.
0 commit comments