Module pre::core [−][src]
Expand description
Precondition definitions for unsafe
functions in the core
library.
It can be used as a drop-in replacement for it. For more information about it, you can read its documentation.
Is this complete?
No, currently only a subset of unsafe
functions actually have preconditions defined
here. More may be added in the future. If you’re missing something, please file an
issue.
Nevertheless, all of the core
library is still usable through this module,
but not all of the unsafe
functions will have preconditions added to them.
As a workaround, you can add the preconditions locally in your own crate using the
extern_crate
attribute.
What about primitives?
You can find the preconditions for methods of the primitive types in impl
blocks in
the root core
module. Currently preconditions are provided for the following
primitives:
*const T
: inconst_pointer
(#[forward(impl pre::core::const_pointer)]
)*mut T
: inmut_pointer
(#[forward(impl pre::core::mut_pointer)]
)
For more information on how to have these preconditions checked, have a look at the documentation of the forward attribute.
Re-exports
pub use core::*;
Modules
pre
definitions for the core::mem
module.
pre
definitions for the core::ptr
module.
pre
definitions for the core::slice
module.
pre
definitions for the core::str
module.
Functions
A stub for the preconditions of the core::const_pointer<T>::add
function.
A stub for the preconditions of the core::const_pointer<T>::as_ref
function.
A stub for the preconditions of the core::const_pointer<T>::copy_to
function.
A stub for the preconditions of the core::const_pointer<T>::copy_to_nonoverlapping
function.
A stub for the preconditions of the core::const_pointer<T>::offset
function.
A stub for the preconditions of the core::const_pointer<T>::read
function.
A stub for the preconditions of the core::const_pointer<T>::read_unaligned
function.
A stub for the preconditions of the core::const_pointer<T>::read_volatile
function.
A stub for the preconditions of the core::const_pointer<T>::sub
function.
A stub for the preconditions of the core::mut_pointer<T>::add
function.
A stub for the preconditions of the core::mut_pointer<T>::as_mut
function.
A stub for the preconditions of the core::mut_pointer<T>::as_ref
function.
A stub for the preconditions of the core::mut_pointer<T>::copy_from
function.
A stub for the preconditions of the core::mut_pointer<T>::copy_from_nonoverlapping
function.
A stub for the preconditions of the core::mut_pointer<T>::copy_to
function.
A stub for the preconditions of the core::mut_pointer<T>::copy_to_nonoverlapping
function.
A stub for the preconditions of the core::mut_pointer<T>::drop_in_place
function.
A stub for the preconditions of the core::mut_pointer<T>::offset
function.
A stub for the preconditions of the core::mut_pointer<T>::read
function.
A stub for the preconditions of the core::mut_pointer<T>::read_unaligned
function.
A stub for the preconditions of the core::mut_pointer<T>::read_volatile
function.
A stub for the preconditions of the core::mut_pointer<T>::replace
function.
A stub for the preconditions of the core::mut_pointer<T>::sub
function.
A stub for the preconditions of the core::mut_pointer<T>::swap
function.
A stub for the preconditions of the core::mut_pointer<T>::write
function.
A stub for the preconditions of the core::mut_pointer<T>::write_bytes
function.
A stub for the preconditions of the core::mut_pointer<T>::write_unaligned
function.
A stub for the preconditions of the core::mut_pointer<T>::write_volatile
function.