pub trait AddToCache {
// Required method
fn add_to_cache(self, cache: &mut *mut mu_Cache) -> *mut mu_Source;
}Expand description
Trait for types that can be added to a cache.
This trait is automatically implemented for common types:
&str- Borrowed string contentString- Owned string content (stored in cache)OwnedSource<S>- Any type implementingAsRef<[u8]>(Vec<u8>,Box<[u8]>, etc.)- Tuples with filename:
(&str, &str),(String, &str) - Custom
Sourcetrait implementations
Users typically don’t need to implement this trait directly.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".