[][src]Module pre::std

Precondition definitions for unsafe functions in the std 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 std 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 std module. Currently preconditions are provided for the following primitives:

  • *const T: in const_pointer (#[forward(impl pre::std::const_pointer)])
  • *mut T: in mut_pointer (#[forward(impl pre::std::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 std::*;

Modules

mem

pre definitions for the std::mem module.

ptr

pre definitions for the std::ptr module.

slice

pre definitions for the std::slice module.

str

pre definitions for the std::str module.

string

pre definitions for the std::string module.

vec

pre definitions for the std::vec module.

Functions

const_pointer__impl__add__

A stub for the preconditions of the std::const_pointer<T>::add function.

const_pointer__impl__as_ref__

A stub for the preconditions of the std::const_pointer<T>::as_ref function.

const_pointer__impl__copy_to__

A stub for the preconditions of the std::const_pointer<T>::copy_to function.

const_pointer__impl__copy_to_nonoverlapping__

A stub for the preconditions of the std::const_pointer<T>::copy_to_nonoverlapping function.

const_pointer__impl__offset__

A stub for the preconditions of the std::const_pointer<T>::offset function.

const_pointer__impl__read__

A stub for the preconditions of the std::const_pointer<T>::read function.

const_pointer__impl__read_unaligned__

A stub for the preconditions of the std::const_pointer<T>::read_unaligned function.

const_pointer__impl__read_volatile__

A stub for the preconditions of the std::const_pointer<T>::read_volatile function.

const_pointer__impl__sub__

A stub for the preconditions of the std::const_pointer<T>::sub function.

mut_pointer__impl__add__

A stub for the preconditions of the std::mut_pointer<T>::add function.

mut_pointer__impl__as_mut__

A stub for the preconditions of the std::mut_pointer<T>::as_mut function.

mut_pointer__impl__as_ref__

A stub for the preconditions of the std::mut_pointer<T>::as_ref function.

mut_pointer__impl__copy_from__

A stub for the preconditions of the std::mut_pointer<T>::copy_from function.

mut_pointer__impl__copy_from_nonoverlapping__

A stub for the preconditions of the std::mut_pointer<T>::copy_from_nonoverlapping function.

mut_pointer__impl__copy_to__

A stub for the preconditions of the std::mut_pointer<T>::copy_to function.

mut_pointer__impl__copy_to_nonoverlapping__

A stub for the preconditions of the std::mut_pointer<T>::copy_to_nonoverlapping function.

mut_pointer__impl__drop_in_place__

A stub for the preconditions of the std::mut_pointer<T>::drop_in_place function.

mut_pointer__impl__offset__

A stub for the preconditions of the std::mut_pointer<T>::offset function.

mut_pointer__impl__read__

A stub for the preconditions of the std::mut_pointer<T>::read function.

mut_pointer__impl__read_unaligned__

A stub for the preconditions of the std::mut_pointer<T>::read_unaligned function.

mut_pointer__impl__read_volatile__

A stub for the preconditions of the std::mut_pointer<T>::read_volatile function.

mut_pointer__impl__replace__

A stub for the preconditions of the std::mut_pointer<T>::replace function.

mut_pointer__impl__sub__

A stub for the preconditions of the std::mut_pointer<T>::sub function.

mut_pointer__impl__swap__

A stub for the preconditions of the std::mut_pointer<T>::swap function.

mut_pointer__impl__write__

A stub for the preconditions of the std::mut_pointer<T>::write function.

mut_pointer__impl__write_bytes__

A stub for the preconditions of the std::mut_pointer<T>::write_bytes function.

mut_pointer__impl__write_unaligned__

A stub for the preconditions of the std::mut_pointer<T>::write_unaligned function.

mut_pointer__impl__write_volatile__

A stub for the preconditions of the std::mut_pointer<T>::write_volatile function.