Lines Matching refs:Any
66 any::{Any, TypeId},
85 pub type BoxedCaster = Box<dyn Any + Send + Sync>;
166 fn cast_arc_panic<T: ?Sized + 'static>(_: Arc<dyn Any + Sync + Send>) -> Arc<T> { in cast_arc_panic()
180 pub cast_ref: fn(from: &dyn Any) -> &T,
184 pub cast_mut: fn(from: &mut dyn Any) -> &mut T,
188 pub cast_box: fn(from: Box<dyn Any>) -> Box<T>,
192 pub cast_rc: fn(from: Rc<dyn Any>) -> Rc<T>,
196 pub cast_arc: fn(from: Arc<dyn Any + Sync + Send + 'static>) -> Arc<T>,
201 cast_ref: fn(from: &dyn Any) -> &T, in new()
202 cast_mut: fn(from: &mut dyn Any) -> &mut T, in new()
203 cast_box: fn(from: Box<dyn Any>) -> Box<T>, in new()
204 cast_rc: fn(from: Rc<dyn Any>) -> Rc<T>, in new()
216 cast_ref: fn(from: &dyn Any) -> &T, in new_sync()
217 cast_mut: fn(from: &mut dyn Any) -> &mut T, in new_sync()
218 cast_box: fn(from: Box<dyn Any>) -> Box<T>, in new_sync()
219 cast_rc: fn(from: Rc<dyn Any>) -> Rc<T>, in new_sync()
220 cast_arc: fn(from: Arc<dyn Any + Sync + Send>) -> Arc<T>, in new_sync()
266 pub trait CastFrom: Any + 'static {
268 fn ref_any(&self) -> &dyn Any; in ref_any() argument
271 fn mut_any(&mut self) -> &mut dyn Any; in mut_any() argument
274 fn box_any(self: Box<Self>) -> Box<dyn Any>; in box_any() argument
277 fn rc_any(self: Rc<Self>) -> Rc<dyn Any>; in rc_any() argument
294 fn arc_any(self: Arc<Self>) -> Arc<dyn Any + Sync + Send + 'static>; in arc_any()
297 impl<T: Sized + Any + 'static> CastFrom for T {
298 fn ref_any(&self) -> &dyn Any { in ref_any() argument
302 fn mut_any(&mut self) -> &mut dyn Any { in mut_any() argument
306 fn box_any(self: Box<Self>) -> Box<dyn Any> { in box_any() argument
310 fn rc_any(self: Rc<Self>) -> Rc<dyn Any> { in rc_any() argument
315 impl CastFrom for dyn Any + 'static {
316 fn ref_any(&self) -> &dyn Any { in ref_any() argument
320 fn mut_any(&mut self) -> &mut dyn Any { in mut_any() argument
324 fn box_any(self: Box<Self>) -> Box<dyn Any> { in box_any() argument
328 fn rc_any(self: Rc<Self>) -> Rc<dyn Any> { in rc_any() argument
334 fn arc_any(self: Arc<Self>) -> Arc<dyn Any + Sync + Send + 'static> { in arc_any()
339 impl CastFrom for dyn Any + Sync + Send + 'static {
340 fn ref_any(&self) -> &dyn Any { in ref_any() argument
344 fn mut_any(&mut self) -> &mut dyn Any { in mut_any() argument
348 fn box_any(self: Box<Self>) -> Box<dyn Any> { in box_any() argument
352 fn rc_any(self: Rc<Self>) -> Rc<dyn Any> { in rc_any() argument
357 impl CastFromSync for dyn Any + Sync + Send + 'static {
358 fn arc_any(self: Arc<Self>) -> Arc<dyn Any + Sync + Send + 'static> { in arc_any()
366 use std::any::{Any, TypeId};
481 let st: &dyn Any = &ts; in cast_ref_from_any()
489 let st: &mut dyn Any = &mut ts; in cast_mut_from_any()
497 let st: Box<dyn Any> = ts; in cast_box_from_any()
505 let st: Rc<dyn Any> = ts; in cast_rc_from_any()
513 let st: Arc<dyn Any + Send + Sync> = ts; in cast_arc_from_any()
563 let st: &mut dyn Any = &mut ts; in impls_not_mut()