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
/// Try to call a function with a [`spec`](crate::spec) and return a [`Result`].
///
/// The macro must wrap a call expression of the following supported cases:
/// ```ignore
/// // free function with a qualified name
/// let result = try_call! { qualified::free_fn(...) };
/// ```
///
/// ```ignore
/// // method
/// let result = try_call! { receiver.method(...) };
/// ```
///
/// ```ignore
/// // function qualified by a type or trait
/// let result = try_call! { Type::associated_fn(...) };
/// let result = try_call! { <Type>::associated_fn(...) };
/// let result = try_call! { <Type as Trait>::trait_fn(...) };
/// ```
pub use try_call;
/// Return type of a call wrapped by [`try_call!`].
pub type Result<T> = Result;
/// Construct a precondition failure.
/// Construct a postcondition failure.
pub use Post as PostError;
pub use Pre as PreError;
/// Error that represents a pre/postcondition failure.
pub type Messages = String;