diff options
Diffstat (limited to 'mingling_core/src/asset/global_resource.rs')
| -rw-r--r-- | mingling_core/src/asset/global_resource.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/mingling_core/src/asset/global_resource.rs b/mingling_core/src/asset/global_resource.rs index efe4165..29d2405 100644 --- a/mingling_core/src/asset/global_resource.rs +++ b/mingling_core/src/asset/global_resource.rs @@ -99,6 +99,12 @@ impl<ResType: 'static + Send + Sync> std::ops::Deref for GlobalResource<ResType> } } +impl<ResType: 'static + Send + Sync> AsRef<ResType> for GlobalResource<ResType> { + fn as_ref(&self) -> &ResType { + &self.res_arc + } +} + /// Resource marker trait, types that implement the Clone and Default traits can be considered as resources pub trait ResourceMarker { fn res_clone(&self) -> Self; |
