diff options
author | HampusM <hampus@hampusmat.com> | 2022-08-29 20:52:56 +0200 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2022-08-29 21:01:32 +0200 |
commit | 080cc42bb1da09059dbc35049a7ded0649961e0c (patch) | |
tree | 307ee564124373616022c1ba2b4d5af80845cd92 /src/errors/ptr.rs | |
parent | 6e31d8f9e46fece348f329763b39b9c6f2741c07 (diff) |
feat: implement async functionality
Diffstat (limited to 'src/errors/ptr.rs')
-rw-r--r-- | src/errors/ptr.rs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/errors/ptr.rs b/src/errors/ptr.rs index e0c3d05..56621c1 100644 --- a/src/errors/ptr.rs +++ b/src/errors/ptr.rs @@ -17,3 +17,21 @@ pub enum SomePtrError 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, + }, +} |