pub struct StaticRef<T> { /* private fields */ }
Expand description
A pointer to statically allocated mutable data such as memory mapped I/O registers.
This is a simple wrapper around a raw pointer that encapsulates an unsafe
dereference in a safe manner. It serve the role of creating a &'static T
given a raw address and acts similarly to extern
definitions, except
StaticRef
is subject to module and crate boundaries, while extern
definitions can be imported anywhere.
Implementations
Trait Implementations
impl<T> Copy for StaticRef<T>
Auto Trait Implementations
impl<T> RefUnwindSafe for StaticRef<T> where
T: RefUnwindSafe,
impl<T> !Send for StaticRef<T>
impl<T> !Sync for StaticRef<T>
impl<T> Unpin for StaticRef<T>
impl<T> UnwindSafe for StaticRef<T> where
T: RefUnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more