Diffstat (limited to 'src/any/static_wrapper.rs')
| -rw-r--r-- | src/any/static_wrapper.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/any/static_wrapper.rs b/src/any/static_wrapper.rs index d167257..511982a 100644 --- a/src/any/static_wrapper.rs +++ b/src/any/static_wrapper.rs @@ -62,3 +62,15 @@ nameable! { impl [T] for BoxedStatic<T> where { T: ?Sized + 'static } impl [T] where BoxedStatic<T> { T: ?Sized + 'static } } + +#[derive(Debug)] +pub enum BorrowedStaticValue<'ctx, T: ?Sized + 'static> { + Ctx(&'ctx T), + Static(&'static T), +} + +#[derive(Debug)] +pub enum BorrowedMutStaticValue<'ctx, T: ?Sized + 'static> { + Ctx(&'ctx mut T), + Static(&'static mut T), +} |