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/interfaces/any_factory.rs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'src/interfaces/any_factory.rs') diff --git a/src/interfaces/any_factory.rs b/src/interfaces/any_factory.rs index 887bb61..1bf9208 100644 --- a/src/interfaces/any_factory.rs +++ b/src/interfaces/any_factory.rs @@ -2,7 +2,7 @@ use std::fmt::Debug; -use crate::libs::intertrait::CastFrom; +use crate::libs::intertrait::{CastFrom, CastFromSync}; /// Interface for any factory to ever exist. pub trait AnyFactory: CastFrom {} @@ -14,3 +14,14 @@ impl Debug for dyn AnyFactory f.write_str("{}") } } + +/// Interface for any threadsafe factory to ever exist. +pub trait AnyThreadsafeFactory: CastFromSync {} + +impl Debug for dyn AnyThreadsafeFactory +{ + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result + { + f.write_str("{}") + } +} -- cgit v1.2.3-18-g5258