pub trait GloballyInternable: Sized {
// Required method
fn intern_cache() -> &'static InternCache<Self>;
// Provided method
fn into_intern(self) -> Intern<Self>
where Self: Eq + Hash + 'static { ... }
}Expand description
Offers access to globally available cache for InternCache.
Typically derived using crate::derive_deftly_template_GloballyInternable.
Required Methods§
Sourcefn intern_cache() -> &'static InternCache<Self>
fn intern_cache() -> &'static InternCache<Self>
Returns a reference to the global cache instance of this type.
Implemented by implementors of this trait.
Users of the trait should usually use GloballyInternable::into_intern().
Provided Methods§
Sourcefn into_intern(self) -> Intern<Self>
fn into_intern(self) -> Intern<Self>
Places self into the global cache.
Please use this instead of T::intern_cache().intern(value).
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".