Struct static_ref::Static
[−]
[src]
#[repr(C)]pub struct Static<T: ?Sized> where
T: , { /* fields omitted */ }
A value stored in a static
variable
Methods
impl<T> Static<T>
[src]
const unsafe fn new(value: T) -> Self
Asserts that this value
is stored in a static
variable
unsafe fn ref_<'a>(r: &'a T) -> &'a Static<T>
Asserts that the reference r
points to data stored in a static
variable
unsafe fn ref_mut<'a>(r: &'a mut T) -> &'a mut Static<T>
Asserts that the reference r
points to data stored in a static
variable
fn wrap(r: &'static T) -> &'static Static<T>
Wraps a static reference into Static
fn wrap_mut(r: &'static mut T) -> &'static mut Static<T>
Wraps a mutable static reference into Static
Trait Implementations
impl<T> Deref for Static<T>
[src]
type Target = T
The resulting type after dereferencing
fn deref(&self) -> &T
The method called to dereference a value
impl<T> DerefMut for Static<T>
[src]
fn deref_mut(&mut self) -> &mut T
The method called to mutably dereference a value