From 080cc42bb1da09059dbc35049a7ded0649961e0c Mon Sep 17 00:00:00 2001 From: HampusM Date: Mon, 29 Aug 2022 20:52:56 +0200 Subject: feat: implement async functionality --- src/errors/ptr.rs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'src/errors/ptr.rs') 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, + }, +} -- cgit v1.2.3-18-g5258