1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
//! Bridge between Rust types and their underlying raw handles. Mirrors
//! `mpi::raw` in rsmpi. In a C-backed MPI these expose the opaque `MPI_*`
//! handles; here the "raw" form of a handle is the pure-Rust identifier the
//! runtime uses internally (e.g. a communicator context id).
use crateDatatypeRef;
use crate;
/// A type that can produce its raw handle.
///
/// # Safety
///
/// The returned raw handle must remain valid for as long as `self` is alive.
pub unsafe
/// A type that can produce a mutable pointer to its raw handle.
///
/// # Safety
///
/// See [`AsRaw`].
pub unsafe
/// A type that can be reconstructed from its raw handle.
/// Marker for types whose in-memory layout is identical to their raw handle,
/// so that `&[Self]` can be reinterpreted as `&[Self::Raw]`.
///
/// # Safety
///
/// The implementing type must be layout-compatible with `Self::Raw`.
pub unsafe
// SAFETY: a communicator's raw identity is its context id.
unsafe
// SAFETY: a datatype's raw identity is its numeric id.
unsafe
/// Re-exports of the raw-handle traits, for `use mpi::raw::traits::*;`.