blob: 56621c1d628913ad114b39d6fff58fe7a1bee684 (
plain)
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
|
//! Smart pointer alias errors.
/// Error type for [`SomePtr`].
///
/// [`SomePtr`]: crate::ptr::SomePtr
#[derive(thiserror::Error, Debug)]
pub enum SomePtrError
{
/// Tried to get as a wrong smart pointer type.
#[error("Wrong smart pointer type. Expected {expected}, found {found}")]
WrongPtrType
{
/// The expected smart pointer type.
expected: &'static str,
/// The found smart pointer type.
found: &'static str,
},
}
/// Error type for [`SomeThreadsafePtr`].
///
/// [`SomeThreadsafePtr`]: crate::ptr::SomeThreadsafePtr
#[derive(thiserror::Error, Debug)]
pub enum SomeThreadsafePtrError
{
/// Tried to get as a wrong threadsafe smart pointer type.
#[error("Wrong threadsafe smart pointer type. Expected {expected}, found {found}")]
WrongPtrType
{
/// The expected smart pointer type.
expected: &'static str,
/// The found smart pointer type.
found: &'static str,
},
}
|