Trait unsafe_any::UnsafeAny [] [src]

pub trait UnsafeAny: Any { }

A trait providing unchecked downcasting to its contents when stored in a trait object.

Methods

impl UnsafeAny
[src]

unsafe fn downcast_ref_unchecked<T: 'static>(&self) -> &T

Returns a reference to the contained value, assuming that it is of type T.

Warning

If you are not absolutely certain of T you should not call this!

unsafe fn downcast_mut_unchecked<T: 'static>(&mut self) -> &mut T

Returns a mutable reference to the contained value, assuming that it is of type T.

Warning

If you are not absolutely certain of T you should not call this!

unsafe fn downcast_unchecked<T: 'static>(self: Box<UnsafeAny>) -> Box<T>

Returns a the contained value, assuming that it is of type T.

Warning

If you are not absolutely certain of T you should not call this!

Trait Implementations

impl UnsafeAnyExt for UnsafeAny
[src]

unsafe fn downcast_ref_unchecked<T: 'static>(&self) -> &T

Returns a reference to the contained value, assuming that it is of type T. Read more

unsafe fn downcast_mut_unchecked<T: 'static>(&mut self) -> &mut T

Returns a mutable reference to the contained value, assuming that it is of type T. Read more

unsafe fn downcast_unchecked<T: 'static>(self: Box<UnsafeAny>) -> Box<T>

Returns a the contained value, assuming that it is of type T. Read more

impl UnsafeAnyExt for UnsafeAny + Send
[src]

unsafe fn downcast_ref_unchecked<T: 'static>(&self) -> &T

Returns a reference to the contained value, assuming that it is of type T. Read more

unsafe fn downcast_mut_unchecked<T: 'static>(&mut self) -> &mut T

Returns a mutable reference to the contained value, assuming that it is of type T. Read more

unsafe fn downcast_unchecked<T: 'static>(self: Box<UnsafeAny + Send>) -> Box<T>

Returns a the contained value, assuming that it is of type T. Read more

impl UnsafeAnyExt for UnsafeAny + Sync
[src]

unsafe fn downcast_ref_unchecked<T: 'static>(&self) -> &T

Returns a reference to the contained value, assuming that it is of type T. Read more

unsafe fn downcast_mut_unchecked<T: 'static>(&mut self) -> &mut T

Returns a mutable reference to the contained value, assuming that it is of type T. Read more

unsafe fn downcast_unchecked<T: 'static>(self: Box<UnsafeAny + Sync>) -> Box<T>

Returns a the contained value, assuming that it is of type T. Read more

impl UnsafeAnyExt for UnsafeAny + Send + Sync
[src]

unsafe fn downcast_ref_unchecked<T: 'static>(&self) -> &T

Returns a reference to the contained value, assuming that it is of type T. Read more

unsafe fn downcast_mut_unchecked<T: 'static>(&mut self) -> &mut T

Returns a mutable reference to the contained value, assuming that it is of type T. Read more

unsafe fn downcast_unchecked<T: 'static>(self: Box<UnsafeAny + Send + Sync>) -> Box<T>

Returns a the contained value, assuming that it is of type T. Read more

Implementors