aboutsummaryrefslogtreecommitdiff
path: root/src/errors/ptr.rs
blob: 1db10c76876e535fc8092e69ef161ce56c659b3a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
//! Smart pointer alias errors.

/// Error type for [`SomePtr`] and [`SomeThreadsafePtr`].
///
/// [`SomePtr`]: crate::ptr::SomePtr
/// [`SomeThreadsafePtr`]: crate::ptr::SomeThreadsafePtr
#[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,
    },
}