diff options
| author | Dirk Van Haerenborgh <vhdirk@gmail.com> | 2019-11-22 19:29:41 +0100 |
|---|---|---|
| committer | Dirk Van Haerenborgh <vhdirk@gmail.com> | 2019-11-22 19:29:41 +0100 |
| commit | 63635360cd25e95bfa2c52c09592e19e656e3d66 (patch) | |
| tree | 61eedd72859b3db82ee062c8d41b9fbb1eb9f0e2 | |
| parent | 3b92173d12659231629c2205138b0857b66942f3 (diff) | |
| download | mail-63635360cd25e95bfa2c52c09592e19e656e3d66.tar.gz | |
allow using with NonSync
| -rw-r--r-- | src/utils.rs | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/src/utils.rs b/src/utils.rs index 57e4004..b5b90f0 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -37,15 +37,25 @@ impl ToString for *const libc::c_char { } } -// pub type ScopedNonSyncSupercow<'a, OWNED, BORROWED = OWNED> = -// Supercow<'a, OWNED, BORROWED, -// Box<NonSyncFeatures<'a> + 'a>, -// BoxedStorage>; +#[cfg(not(nonsync))] pub type ScopedPhantomcow<'a, OWNED, BORROWED = OWNED, SHARED = Box<dyn DefaultFeatures<'a> + 'a>, STORAGE = BoxedStorage> = Supercow<'a, OWNED, BORROWED, SHARED, STORAGE, ()>; +#[cfg(not(nonsync))] pub type ScopedSupercow<'a, OWNED, BORROWED = OWNED, SHARED = Box<dyn DefaultFeatures<'a> + 'a>> = Supercow<'a, OWNED, BORROWED, SHARED, BoxedStorage>; + + +#[cfg(nonsync)] +pub type ScopedPhantomcow<'a, OWNED, BORROWED = OWNED, + SHARED = Box<dyn NonSyncFeatures<'a> + 'a>, + STORAGE = BoxedStorage> = + Supercow<'a, OWNED, BORROWED, SHARED, STORAGE, ()>; + +#[cfg(nonsync)] +pub type ScopedSupercow<'a, OWNED, BORROWED = OWNED, SHARED = Box<dyn NonSyncFeatures<'a> + 'a>> = + Supercow<'a, OWNED, BORROWED, SHARED, BoxedStorage>; + |
